• Resolved George

    (@chainkiller)


    Hello.

    I have a custom field containing Japanese characters.
    When i include this field in the search i always get the latest posts after the actual results.

    For example if i search for something and i should get 3 results, i get those 3 results, but after those i get the latest posts until it reaches the max results.

    I have “Show exact matches only?” on and only search in the title and that field, if i remove that field from search all works as expected.

    https://www.ads-software.com/plugins/ajax-search-lite/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi!

    I think I know what the problem is caused by. I’ve found an error regarding the exact matches at custom fields.

    I believe that might be causing the problem. If the latest posts have this field and some of the words you type in, then it would definitely explain that.

    I’m definitely fixing this in the upcoming version. Until then, if you want you can try this:

    1. Open up the wp-content/plugins/ajax-search-lite/includes/search_content.class.php file and go to line 191, where you should see this:

    $words = $options['set_exactonly'] == 1 ? $s : $_si;

    2. Change that line to:

    $words = $options['set_exactonly'] == 1 ? array( $s ) : $_s;

    Hopefully that will solve the problem.

    Thread Starter George

    (@chainkiller)

    Worked. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Searching in a custom field problems’ is closed to new replies.