New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasitcsearch Full Text search strategies. #19

Closed
5hirish opened this Issue Apr 18, 2018 · 3 comments

Comments

1 participant
@5hirish
Owner

5hirish commented Apr 18, 2018

The current search implementation uses match query DSL, the standard query for performing full-text queries, including fuzzy matching and phrase or proximity queries. Link >>

Match Query

This query is of boolean type and the search query goes through analysis phase and it also supports the operator flag for and, or (or being the default). It supports the boolean clauses, should, must, must_not.

The match query supports multi-terms synonym expansion with the synonym_graph token filter. By default the parameter auto_generate_synonyms_phrase_query is set to true.

This issue explores other alternatives to the current implementation.

@5hirish

This comment has been minimized.

Owner

5hirish commented Apr 18, 2018

Query String Query

The query_string query parses the input and splits text around operators. Each textual part is analyzed independently of each other. Link >>

The differentiating components here are the top level parameters like defult_field, default_operator, analyzer.

The query_string query can also run against multiple fields. Fields can be provided via the "fields" parameter (example below). It also supports multi-terms synonym expansion with the synonym_graph token filter.

@5hirish

This comment has been minimized.

Owner

5hirish commented Apr 18, 2018

Multi Match Query

The multi_match query builds on the match query to allow multi-field queries. We can sepcify the fields to be queried. Link >>

The way the multi_match query is executed internally depends on the type parameter:

  • best_fields (default) finds documents which match any field, but uses the _score from the best field.
  • most_fields finds documents which match any field and combines the _score from each field.
  • cross_fields treats fields with the same analyzer as though they were one big field. Looks for each word in any field.
@5hirish

This comment has been minimized.

Owner

5hirish commented May 3, 2018

#24 PR Fixed this issue. Using the multi_match with most_fields

@5hirish 5hirish closed this May 3, 2018

@5hirish 5hirish added this to Done in Issues Board May 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment