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/d9d34e14-7d3c-41a5-b3ad-a33ccbd79d45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to