Query string syntax for exact match against array field?

One thought occurred to me. Perhaps:

  1. Build the token count into your ingredients field. Here's how:
    http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-core-types.html#token_count

2a. Pre-analyze your query arguments and remove the duplicates. For
example, ingredients:"apples" ingredients:"apples".

2b. Add the token_count to your query, Based on the ES link and on the
example in 2a, you would add ingredients.word_count:1 to your query. Now,
in your set of 2 documents, document #1 would be filtered out of the
response and only document #2 would be returned.

Hope this helps!

Brian

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/041ea39a-f1f0-43c8-a648-f06d614e71ba%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.