ElasticSearch Bool Query or Finding Exact Values -
I am slightly confused versus in elasticsearch. Specifically, I have title_field and post_field which I want to find. But I use all my other areas because I want to see whether they exist or not or how often (should be accurate as URL or username).
Then I can see from the docs that I can do one at title_field and post_field .
But what about other fields I want accurate reactions? Should I use one? Or do I need to remap all those areas? Or do I need to map them to not_anayzed as before and then do a boolean query?
In fact, you want to map areas that you want to exact as match on not_analyzed, map It means that many tokens are treated as they are treated as a single mark instead.
Then you should use a word query or filter to match exactly the token. If you are using a filter, you can use and, or, and not as well (more convenient than the bool) filter. Since mapping all areas is a little hard, you can use dynamic_mapping instead of mapping all to the fields as not_analyzed string fields and then just add a mapping to those areas you want Analyzed: {{"non_analyzed_string": {"match": "*" "match_mapping_type": "string", "mapping": {"type": "string "," Index ":" not_analyzed "}}}]
Comments
Post a Comment