You can choose which custom fields to index.
Relevanssi can index:
– titles and content
– tags
– custom fields
– comments
– pingbacks
That’s all. I suppose adding a feature to index certain fields of user-chosen MySQL tables could be possible.
Thread Starter
maorb
(@maorb)
Thanks for your answer.
So I understand that for the moment, if I have more tables which were created by a directory plugin, Relevanssi won’t find them on the site search?
I’d be really happy if such a feature of searching other tables as well will be also included and possible.
I think that for the moment the Search Unleashed plugin is the only one that indexes also other MySQL tables, thus gives a wide answer for searching more content on a site.
Thanks
Yes, as Relevanssi simply cannot know what tables you have in your database. Of course it could snoop around, but knowing what the user wants to index is another thing.
Could give me an example of a table you’d like to include in the index? What sort of data the tables have? If each row has a post ID and text fields, adding them to the Relevanssi database shouldn’t be too tricky.
Thread Starter
maorb
(@maorb)
Well, I use the WP-Directory-List plugin, which creates the tables
wp_directory_link_cats
wp_directory_links
The first for the categories you define, and the second for the directory link themseleves, there you have some text fields such as the name of the link, description etc and other fields for address, city, website, and so on.
But these tables are not attached to any Post ID, and there’s no field for that, only the id of a record in the table, since when you want to display the content of a category in a post/page, you just use some shortcode for that.
Is there an option to manually add to the plugin the tables’ names that I want to index, and in that way have them being indexed?
I was thinking to add a feature to add other data to the index. However, it wouldn’t help you in this case, as I was mostly thinking about databases where the content links to post ID’s.
In this case you’re adding data to posts with a shortcode, and that’s harder to implement. I know there’s a search plugin (Search Unleashed, I think) that indexes documents as they are shown to users (shortcodes expanded) and that would certainly be useful, but I have no idea how that is done.
Thread Starter
maorb
(@maorb)
Yes, you’re right, it is Search Unleashed plugin, and for the moment I’m using this plugin for search, but I have some problems with it (for example – it find terms only if I’m on the hompepage), so I’m also looking for some other plugin to replace.
I think the plugin is going directly to the MySQL database when searching. It identifies the plugins you use, and thus (I think) it knows which tables in the database to scan.
Do you think that there is an option to use 2 different Search plugins, or it might be a mess?
I have another question, but I’ll open a new thread, since it about another issue of the search possibilty..
Thanks a lot for your answers, and for the quick time you answer. I really appreciate that!
Maor