lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: How exclude empty fields?
Date Wed, 16 Nov 2016 18:37:48 GMT
: The issue I have is that some promotions are permanent so they don't have
: an endDate set.
: I tried doing:
: ( +Promotion.endDate:[20000101000000TOvariable containing yesterday's date]
: || -Promotion.endDate:* )

1) mixing prefix ops with "||" like this is most certainly not doing what 
you think...

2) combine that with Ahmet's point about needing a "MatchAllDocsQuery" to 
"select all docs" from which you can thin "exclude docs with an endDate" 
to give you the final results of "docs w/o an endDate" ...

  Should(NumericRangeQuery("endDate:[X TO Y]"))

...either that, or index a new boolean field "permenant" and then simplify 
your query to basically just be "endDate:[X TO Y] OR permentant:true"


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message