Re: Is it possible to do a text query against a (pre)defined set of fields?

2014-01-08 Thread InquiringMind
Ville, By default, the _all field includes all of the indexed field. Then, for your private fields, explicitly exclude them from the _all field by adding the following to their properties: "include_in_all" : false See the ES guide for more details, Specifically, this

Re: Is it possible to do a text query against a (pre)defined set of fields?

2014-01-08 Thread Ville Mattila
Hi, Well - I think I've understood something wrong here. Isn't _all a special key that includes all indexed fields? Is there possibility to change the fields included in _all? Ville Ville, > > Perhaps: Don't include the private fields in _all. Then a query against > _all would be restricted

Re: Is it possible to do a text query against a (pre)defined set of fields?

2014-01-08 Thread InquiringMind
Ville, Perhaps: Don't include the private fields in _all. Then a query against _all would be restricted to the (perhaps hundreds) of "public" fields. A query that includes the private fields would need to list _all and then the private fields. But since you have only 2 or 3 private fields, ther

Is it possible to do a text query against a (pre)defined set of fields?

2014-01-08 Thread Ville Mattila
Hi, I am indexing some large documents in an index. When making full text queries, I've generally used {"text": {"_all": "some text search"}} to find all possible results. However, the document contains a few "private" fields that should be queryable only by a certain user group. What I was wo