Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone

Free Text Search

...

The free text searches work with the ES simple query string syntax. Here are the key points of the syntax.

  • + signifies AND operation. By default, it does an OR query on all the words/tokens provided. To do an AND query instead put a + between the words. For example, to search for items matching both store and norske the query can be store + norske.

  • | signifies OR operation. To search for something both using AND and OR queries + and | both operators can be used. For example, to search for items having den AND norsk OR store AND norsk the query can be den | store + norsk.

  • - negates a single token. To search for something excluding one or multiple words/tokens this operator can be put in front of that word/token. For example, to search for items having den AND store but NOT norsk the query can be den | store - norsk.

  • " wraps a number of tokens to signify a phrase for searching. To group some words/tokens to signify a phrase those words/tokens can be surrounded with double quotes ". For example, to search for items having den store the query can be "den store".

  • * at the end of a term signifies a prefix query. For example, to match all the items having words that start with norsk the query can be norsk*.

  • ( and ) signify precedence. Operators can be grouped using brackets to control their precedence. For example, search for items having den AND store OR norsk the query can be den + (store | norsk).

  • ~N after a word signifies edit distance (fuzziness). When the exact word is not known this operator can be used so ES can guess the word with the provided edit distance. For example, if sto~2 is provided it will try to create/edit/replace 2 characters of sto to make some words (store, test, etc.) and match.

Basic Search

Advanced Search