Sorry. I don't understand. May be others understand?
Or could you write an example of what you tried so far and post it on gist.github.com?
Have a look at http://www.elasticsearch.org/help/
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 4 juillet 2014 à 09:46:59, 闫旭 (yancey1989@gmail.com) a écrit:
Thanks your reply.
The first :
add term (type1, "A") in the must clause.
I want to fech field type1, so i don't know the value of type1 before i do the query.
于 2014年07月04日 15:34, David Pilato 写道:
add term (type1, "A") in the must clause.
add term (type2, "1") and (type2, "2) in the should clause with minimum should match 1.
Should work as you are expecting.
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr
Le 4 juillet 2014 à 09:29:02, 闫旭 (yancey1989@gmail.com) a écrit:
or bool filter can fech A and B, but I don't want B.
于 2014年07月04日 14:34, vineeth mohan 写道:
Hi ,
You can use bool query to encapsulate various queires. - http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html#query-dsl-bool-query
Thanks
Vineeth
On Fri, Jul 4, 2014 at 11:13 AM, yancey yancey1989@gmail.com wrote:
Dear All !
I have an index, docs like this:
type1 type2 type3
A 1 a
A 1 c
A 2 c
B 1 d
B 3 e
C 1 e
I wonder find the A with type1 which type2==1 and type2 == 2.
How can get the result? Thx all!
--
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/1404452629.8967.5.camel%40yancey.
For more options, visit https://groups.google.com/d/optout.
--
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/CAGdPd5k0%2ByxQK-eutLi6joCRjRU-Etb3cL9YLXyWw6t1WazZYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
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/etPan.53b6591d.19495cff.2fae%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.
--
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/53B65BE7.9000305%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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/etPan.53b66398.238e1f29.2fae%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.