i used the boolfilter with must_not :D and works fine
Em terça-feira, 14 de outubro de 2014 15h26min17s UTC-3, Waldemar Neto
escreveu:
>
> Hello all!
> ia have a criteria with *AND* , *OR* and *NOT* operator, but the *NOT* is
> a single Filter, what is the best way to set multiples *NOT's*?
>
> see my query with *AND*
>
> my *AND* i need *NOT* :D
>
> {
> "highlight": {
> "fields": {
> "*": {
> "fragment_size": 150,
> "number_of_fragments": 1,
> "pre_tags": [
> "<b>"
> ],
> "post_tags": [
> "</b>"
> ]
> }
> }
> },
> "facets": {
> "documents": {
> "terms": {
> "field": "primary_field",
> "size": 5
> }
> }
> },
> "fields": [
> "Document.id",
> "Document.name",
> "Document.updated",
> "DocumentTag.name",
> "Document.approval_number",
> "Document.approval_number_us",
> "Document.approval_number_jp",
> "Version.status",
> "Document.rate",
> "Document.last_status"
> ],
> "sort": [
> "_type"
> ],
> "size": 100000,
> "query": {
> "filtered": {
> "query": {
> "match_all": {}
> },
> "filter": {
> "and": {
> "filters": [
> {
> "terms": {
> "Product.id": [
> "6"
> ]
> }
> },
> {
> "terms": {
> "Version.jp": [
> true
> ]
> }
> },
> {
> "terms": {
> "Version.jp": [
> true
> ]
> }
> },
> {
> "terms": {
> "Document.last_status": [
> "4"
> ]
> }
> }
> ]
> }
> }
> }
> }
> }
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/dea0c612-c1a1-4c0d-9fda-ad70a0cbfb0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.