What does Named Queries and Filters used for?


(Makeyang) #1

when I took a look at the reference, I didn't get what does Named Queries and Filters used for from the example. So can anybody explained it a little bit? maybe a example would be perfect.


(Martijn Van Groningen) #2

In the body of a search request many queries can be specified under the top level query field. A lot of times a document doesn't need to match with all the queries, because these queries are optional (for example should clauses in a boolean query).

If you tag a query element with a _name then in the search result each hit will tell if they matched with that particular query.


(Makeyang) #3

got it. thanks


(system) #4