Reply To: Fulltext search

Ernest Marcinko
Ernest Marcinko


I see the problem now. “Aigen Lehen” does not match a single tag. Each tag is treated separately, because they are stored separately in the database.
The search logic “AND” in this case means that looks for tags that match both “aigen” and “lehen”.

I know it would be logical as you described, and I have experimented with different approaches, but currently it’s not possible because of the following reasons:
1. With a simple concatenation method the performance would drop extremely – by extreme I mean 10 to 1000 times slower depending on tags count
2. The only applicable solution is to create a separate index table to avoid the previously mentioned slowdown at least on some level

The good news is that I’m working on an index table, which is going to be an optional feature and it will solve this and other logical issues as well. It will however take some time until I finish all tests and find the final and best structure – but this is going to happen sooner or later.

As a temporary solution I would do the following:

1. Create a post meta field with the tags for the downloads, for example with the name “search_keywords”
2. Copy/paste the tags there as well, like: “tag1, tag2, tag3…”
3. Select this field to search, instead of terms on the search plugin General Options -> Sources panel.

But of course after creating 1-2 you should check if it works as you expected, not to waste time.

This is good because it’s much less performance heavy as searching in terms, as in this solution, all the tag names are stored in one single field per post.

Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)