New here to Elasticsearch and trying to get a better understanding on the difference between these queries. As far as I can tell, term
matches a single term (ne
I think some one definitely looking for differences between them with respect to PARTIAL SEARCH Here is my analysis with default ‘standard analyzer’ :-
Suppose ,We have data :-
{ "name" : “Hello”}
Now what if we want to do partial search with ell ???
Term Query OR Match query
{"term":{"name": "*ell*" }
Will not work , return noting .
{"term":{"name": "*zz* *ell*" }
Will not work , return noting .
Conclusion - Term or Match is not able to do partial search at all
wildcard Query :-
{"wildcard":{"name": "*ell*" }
Will work give result { "name" : "Hello"}
{"wildcard":{"name": "*zz* *ell*" }
Will not work , return noting .
Conclusion - wildcard is able to do partial search with one token only
Query_string :-
{"query_string": {"default_field": "name","query": "*ell*"}
Will work give result { "name" : “Hello”}
{"query_string": {"default_field": "name","query": "*zz* *ell*" }
Will work give result { "name" : “Hello”} .
Conclusion - query_string is able to search with two token are given
-> here token are ell and zz