Word pairings > Higher Relevance

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Word pairings > Higher Relevance

This topic contains 1 reply, has 2 voices, and was last updated by

 
Keymaster
3 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17594

    Participant

    If it prompts you to enter a password to view the page, enter: ourteamtest2018
    The credentials I provided in the “Private Details” section are the credentials for wp admin, which can be found at: https://haverfordquality.com/wp-admin

    The issue I’m having is that the search form is not holding word pairings at a higher relevance, this is best described using an example:

    If a user searches “Portfolio Manager”, then they will see all results that contain those two words. Though, while there are entries that contain the two word pairing “Portfolio Manager”, there are also some that contain those two words, but not paired together. In this example, Holly Palermo (“Portfolio Assistant & Office Manager“) appears in the results on the same level of relevance as actual Portfolio Managers.

    Is there are way to get the search logic to consider word pairings a higher level of relevance than entries that happen to contain those two words in separate instances?

    Thanks, awesome plugin!!

    -W

    #17604

    Hi!

    The default ‘regular engine’ indeed does not count the relevance of multiple search keywords separately. There are many reasons why, but the main reason is performance. Due to the structure of how these data are stored and how a search query works, calculating relevance during this process is very costly. Adding more keywords will make it exponentially slower.

    There is a solution of course, actually I will recommend two possibilities:

    1. (simple) Changing the keyword logic
    By default the plugin returns anything that matches any of the keywords. This ‘OR’ logic is designed for most use cases, however it can get annoying on larger databases.

    On the General Options -> Logics & Behaviour panel, try chaning the primary logic to ‘AND’: https://i.imgur.com/2oJ81H6.png
    This will not change the relevance by much, but will affect the final results set greatly. You can try out all the other logics as well, to see if any of them fits your needs.

    2. Creating and using the index table engine
    To overcome the barriers of the default search query possibilities, there is a custom built database table, that can be filled with contents of your choice. This has a very special structure that makes possible of counting word occurences and calculating a much better relevance. In this case, each and every matched keyword is calculated towards the final relevance.

    For more information and guides please read these:
    Index table in general
    Generating the index table
    Enabling the index table

    The search logic options in solution 1 will of course work in combination with the Index table engine. I hope this helps!

    Best,
    Ernest Marcinko

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


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.