i have document fields:
"provider": "appstore", "device_model": "ipad3,6[graphicsdevicename: powervr sgx 554]", "days_in_game": 34,
and need documents ipad
string in device_model
!
is possible?
there 2 types of search queries in elasticsearch ie. term queries , match queries. match first analyzes query string, looks documents containing words in query , returns result depending upon how closely matches. term query yes or no query , return documents have exact match. think case term query better fit. , since field not contain exact word ipad ipad3 should use prefix, wildcard or possibly regexp query depending upon document contain(take @ this)
you use following query:
{ "query": { "prefix": { "device_model": "ipad" } }
Comments
Post a Comment