msaari / relevanssi-light

Relevanssi Light fulltext search
17 stars 1 forks source link

Does it work with custom post types? #12

Closed stratboy closed 2 years ago

stratboy commented 2 years ago

Hi, thank you for your code.

This is not an issue thread. I wanted to ask if this light version does work with custom post types and taxonomies too.

I tried Relevanssi 'standard' with the live ajax search, but results are wuite slow to come out (with very very little posts currently saved). So another alt. question could just be. how to speed up Relevanssi 'standard' + ajax live search? but maybe I should ask in te other repo. I'll do right know :)

msaari commented 2 years ago

Yes, Relevanssi Light does work with custom post types, as the normal WordPress search does. The only thing it does is to change the search engine your database is using from the basic MySQL matching to a more powerful full-text engine. It doesn't change what the search covers.

However, it does add a custom column to your wp_posts database table and has methods you can use to add content to that column. Anything in that column is also included in the search, so you can copy taxonomy terms there to be included. This is a clumsy solution, but because the search can only operate in that one table, it's the only way to add data from outside the wp_posts table to the search.

stratboy commented 2 years ago

THank you very much! And is it faster than Relevanssi when used with ajax live search?

msaari commented 2 years ago

Well, it depends on the circumstances. Sometimes Relevanssi is faster, sometimes Relevanssi Light is faster. But generally the bigger the site is, the more clearly Relevanssi Light is faster. The best way to find out is to run both and compare the results.