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

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -