Formulate search query Elasticsearch

Version 6 - Updated on 07 Nov 2017 at 1:25AM by Joachim Hansen

Description


curl -XGET localhost:9200/index_test100/_search?pretty '
{
"query": {
 "match": {
  "content": "first_name Keri,last_name Seally"
}
}
}
' >> /home/search/Downloads/match900.txt


match query
The standard query for performing full text queries, including fuzzy matching and phrase or proximity queries.
match_phrase query
Like the match query but used for matching exact phrases or word proximity matches.
match_phrase_prefix query
The poor man’s search-as-you-type. Like the match_phrase query, but does a wildcard search on the final word.


https://www.elastic.co/guide/en/elasticsearch/reference/current/full-text-queries.html

I Think i will use match query for singe word and match_phase quary for sentance (did not work as well on the dummy dataset though)

I can use sources like this in analysis (discussion or relavancy ... This item should be above this item)... (meaning that search output should be part of the thesis ... maybe in appendix)

Discussion should come with some reason for index size 

https://www.elastic.co/guide/en/elasticsearch/guide/current/relevance-is-broken.html

https://www.elastic.co/guide/en/elasticsearch/reference/current/recipes.html#mixing-exact-search-with-stemming