Thread Starter
kork
(@kork)
Ahhh, nevermind. I was able to clean it up with:
DELETE FROM wpsa_postmeta WHERE meta_key LIKE ‘vendor_%’;
DELETE FROM wpsa_posts WHERE post_type LIKE ‘vendor%’;
I’m struggling to properly index data from a separate table in my WordPress build.
Relevanssi doesn’t modify the wp_posts database table in any way. Relevanssi does add data to wp_postmeta, but all Relevanssi metadata starts with _relevanssi. If it’s something else, it’s not from Relevanssi.
You can use the relevanssi_content_to_index filter hook to add data from a custom table to posts (there’s an example in the documentation). If you want to index documents from different tables, that is unfortunately not possible. Relevanssi can only work with posts, so if you want your custom data indexed by Relevanssi, you need to create posts from it.
Thread Starter
kork
(@kork)
Yes, thank-you Mikko, I realized that when I was cleaning out the tables. I’m trying to figure out how to use relevansii to work with several tables that I want to search, but it’s a learning process. I wish that there was an easy way to search through custom tables and not need to search the posts table. it seems that when relevansii indexes the data in the wp_posts table, it loses the ability to join with other data in other other tables. A good example is a vendor table and a reviews table. If I want to index the reviews, I want them to be linked to the vendor_id that’s associated since they’re separate tables. I’m not finding a way to do this efficiently.
Unfortunately, for custom data, you’re going to need a custom search solution. It’s not easy to create a general search tool that will search any data. Most WordPress search solutions are built to search posts and are heavily based on WordPress post infrastructure, which makes it difficult to incorporate custom data.
You can probably get what you want out of Relevanssi if you create a custom post type for the custom data you want to index, but that can get complicated.
One approach is to use a spidering search engine that uses your public website as the source material instead of the WordPress backend. AddSearch works like that, so that may be one route to explore.