Facet issue
{ "query" : { "query_string" : {"query" : "ck3"} }, "facets" : { "tags" : { "terms" : {"fields" : ["metakey","metaprod","metasol","metares"]} } } }
Printers and Media is a single word in meta tag content attribute. When i run this code then its giving me the counts in such a way that if the word is 'Printers and Media' then its giving me as { term:"printers", count:280 }, { term:"and", count : 300 } { term:"media", count:100 }
But i need as { term:"Printers and Media" count:200 }
like this what would be the changes i need to do in the query.Please suggest.
Thanks in advance.
As per our requirement separation should be done on occurance of ", "(comma space). Is it possible to handle in query, unlike provided by default.
"metakey","metaprod","metasol","metares"
If you use them as facet, you need to specify not_analyzed field in the mapping.
", "(comma space)
I think that it's difficult to handle in query. You can convert extracted value by script in crawling. https://github.com/codelibs/elasticsearch-river-web#rewrite-a-property-value-by-mvel