• I’m new to Relevanssi and I’m trying to index data in separate tables called wpsa_fs_vendors and wpsa_fs_reviews. I sortof having it working, but it appears that Relevanssi has added data to the wpsa_posts and wpsa_postmeta tables. Thousands of rows of data that are all from my wpsa_fs_vendors table.

    I don’t know if it was code that I used that did it, or if it’s Relevansii that does it, but it’s made a big mess. Is there a way to clean out all the Relevansii data that has been pushed around my tables?

    Like I said, I’m new to Relevansii so would appreciate any insight as this data appears to be messing with the ability to create new indexes.

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    Plugin Author Mikko Saari

    (@msaari)

    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.

    Plugin Author Mikko Saari

    (@msaari)

    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.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Deleting Garbage Data’ is closed to new replies.