solr - Filter on fields only if present on a document -
is possible filter document value provided if document has field.
for context,
i have document types a,b,c have field.
i have document types d , e don't.
i define query such filter applies first subset, might later add new document type first set invalidate filter.
you'll have combine query match against documents, except have value in field:
myfield:foobar or (*:* not myfield:*)
.. should want. being said, i'd wait introduce these additional queries until see it's needed, make each query more expensive without possibly being necessary in future - that's judgement.
Comments
Post a Comment