Knowledge Base

Search logic explained

in Ajax Search Pro Tips Tags: explainedkeywordslogicsearchsearch logic

As of version 3.2 it is possible to control the search logic.

General options -> Behavior -> Keyword Logic

 

There are 4 possible logics to choose from:

  1. OR (default)
  2. OR with exact word matches
  3. AND
  4. AND with exact word matches

OR

Match is found if any of the search keywords is part of the result. It's the least strict of all possible options – it returns many results, finds almost anything.

Keyword Possible result Match?
hello hello world, robot here YES
hello robot hello world, robot here YES
hello bot hello world, robot here YES
help bot hello world, robot here YES
hello science hello world, robot here YES

OR with exact word matches

Similar to the simple OR, but at least one keyword must match a whole word, partial results are not accepted.

Keyword Possible result Match?
hello hello world, robot here YES
hello robot hello world, robot here YES
hello bot hello world, robot here NO
help bot hello world, robot here NO
hello science hello world, robot here YES

AND

Every keyword must match at least partially the result.

Keyword Possible result Match?
hello hello world, robot here YES
hello robot hello world, robot here YES
hello bot hello world, robot here YES
help bot hello world, robot here NO (help is not found)
hello science hello world, robot here NO (science is not found)

AND with exact word matches

The most strict search logic. Every keyword must match a whole word in result.

Keyword Possible result Match?
hello hello world, robot here YES
hello robot hello world, robot here YES
hello bot hello world, robot here NO (bot does not match a word)
help bot hello world, robot here NO (bot, help does not match a word)
hello science hello world, robot here NO (science does not match a word)