Search fails once dash is included in search term

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search fails once dash is included in search term

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28630
    TonyL70
    TonyL70
    Participant

    Hello,

    When using Ajax Search Pro in the headers of this site we get errors — “No results for xxxx” — when a dash is added to the part number.

    For example:

    Go to the header search box on any page and put in pd165n, and you will see two potential parts.
    Add the dash (pd165n-) and no results are found.

    We have the current update installed.

    No errors in the error log.

    Have you any suggestions for solving this?

    Thank you — Tony Lush

    #28635
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Tony,

    I assume you are using the index table engine, based on my test searches.
    The word “pd165n” is contained in two titles, one of them is “30150-PD165N-FR-HB”. This title is indexed as “30150-PD165N-FR-HB”, “30150”, “PD165N”, “FR”, “HB”. The problem is, that the index table engine can only run queries matching the start or the end of the keywords – and in this case “PD165N-” does not match any of these, considering the criteria.

    I believe the best and quickest possible resolution to this is, to simply add a keyword exception for the “-” character, by entering it here: https://i.imgur.com/phTU9OI.png

    That should do the trick.

    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.