Of cause! Almost too obvious ;-) thx alot - I'll spend some time wondering why that didn't pop up in my mind as a solution.
On Thu, Dec 8, 2016 at 5:16 PM, Adrien Grand <[email protected]> wrote: > Le jeu. 8 déc. 2016 à 16:42, Hans Lund <[email protected]> a écrit : > > > That would be a solution for sure - but it has the drawback of doubling > the > > indexed fields pr document. > > > > If you want to do it for all fields, you could use the name of the field as > a value, for instance has_field:foo, has_field:bar, etc. This is how > Elasticsearch implements its exists query. One interesting thing to note is > that fields that appear in all documents will require very little storage > since the encoding we use for postings lists is optimized when all docs > have a given value. >
