Some posts show full content of post in search results box

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Some posts show full content of post in search results box

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31056
    bzed82
    bzed82
    Participant

    Hello,

    When using the search box – the results that come up sometimes show full content of the post, instead of just the 200 characters I’ve chosen.

    This happens for a search term like “EU Citizen”.

    I will attach screenshots to see different between expected results and the results coming up for “EU Citizen”.

    Thank you.

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

    Hi,

    Thank you very much for the details, it helped us a lot!

    This was indeed a yet unknown bug, I was able to replicate the issue on our test server as well. The issue was caused by the fact that the algorithm tries to look for the first of the search keyword, in case of “eu citizen”, it looks for the context of “eu” first. However the minimum keyword length was defined as 4 here, in which case the keyword “eu” was ignored (length = 2), and an empty string was passed to the function. It caused to return the whole description without shortening the length.
    I have corrected this problem on your server via the plugin editor, and I will make sure to implement this fix in the upcoming release, so you don’t have to worry about it. It should be all right now.

    If I may suggest a different logic setup, I would recommend this for the best possible, and most relevant results: https://i.imgur.com/rlbAq2W.png

    Best,
    Ernest Marcinko

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


    #31063
    bzed82
    bzed82
    Participant

    Thank you very much. I changed the logic based on your suggestion.

    #31066
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. 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.