Skip to content
This repository has been archived by the owner. It is now read-only.

Elasitcsearch Full Text search strategies. #19

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

Elasitcsearch Full Text search strategies. #19

5hirish opened this issue Apr 18, 2018 · 3 comments

Comments

@5hirish
Copy link
Owner

@5hirish 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
Copy link
Owner Author

@5hirish 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
Copy link
Owner Author

@5hirish 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
Copy link
Owner Author

@5hirish 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Issues Board
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant