Cannot display results by relevance

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Cannot display results by relevance

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 2 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34528
    Eduardo31
    Eduardo31
    Participant

    Hello,

    I cannot make the plugin shows the results in relevance order.

    For example, if you type “dinero el verdugo” (wich has an entry with this exact words) it shows in the first place an entry only with the word: “dinero”, and displays the most exact entry in second or third place (please see attach).

    Is it possible to adjust this?

    Thank you very much and congratulations for this awesome plugin.

    Attachments:
    You must be logged in to view attached files.
    #34544
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details, it helps a lot.

    It took me a while to figure this out why, as it should have returned the results in the expected order. It turns out, the field containing that text, has many line breaks – as most of them are poems. The problem is, that the text “dinero el verdugo” is actually stored as:

    ...dinero el 
    verdugo..

    On database level the phrase “dinero el verdugo” will not match that in any case exactly, as there is a line break character after the word “el”. In the results list it is displayed “correctly”, as the field is already processed (line breaks removed etc..). However it was not an exact match on the server side.

    I thought a lot about a possible resolution to this, but the only way to do it is to have a copy of the desired text without the actual line breaks – and then search that, there is no other way around it. Let me know if that is something you are okay with.
    I will put together a code snippet, which makes a copy of the 1st chapter field, and clears it, then stores it in a different field – it will execute when a new post is added or an existing saved.

    Best,
    Ernest Marcinko

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


    #34557
    Eduardo31
    Eduardo31
    Participant

    Hello Ernest, it is very clear, thank you for your answer.

    In the near future we will work mostly with non poems texts, so no need to bother you about this matter.

    Best wishes

    #34567
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    You are very welcome, let me know if you need any help.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.