Hi all,

I'm reasonably new to solr. Today while stress-testing with possible user
input, I encountered - on solr 9.8.1 - weird behaviour which feels like a
bug, but could theoretically be misconfiguration on my side, simply by not
knowing about things.

I have a <field name="releasedate" type="pdaterange"/> filled with
datetimes, which I use to populate a range facet with years.

When selecting a few of those facets `fq=releasedate:2005 OR
releasedate:2007 OR releasedate:2009` (here not urlencoded for legibility)
everything works as expected (I get many/correct results), and the way I
parse
https://solr.apache.org/guide/solr/latest/indexing-guide/date-formatting-math.html#date-range-formatting
that's indeed intended behaviour.

However, when I add the 17th (16+1!) year like that, suddenly I don't get
any results. I see that the debug output in parsed_filter_queries has
changed drastically, from
`IntersectsPrefixTreeQuery(IntersectsPrefixTreeQuery(fieldName=releasedate,queryShape=2005,detailLevel=9,prefixGridScanLevel=8))`
x16 to `TermInSetQuery(releasedate:(2005 2007 2009 2011 2012 2013 2014 2015
2016 2017 2018 2019 2020 2021 2022 2023 2024))` - since the stored date is
e.g. `2009-01-01T12:00:00Z` (not a real value, forgive me typos), I suspect
that the TermInSetQuery optimization (?) shouldn't be applied to daterange
fields when using truncated dates like this.

I'd like to know if
1) I should file this as a bug report?
2) there is anything (in configuration) I can do to prevent this
optimization (?) from happening to work around the bug? (I can think of
several alternative workarounds in my code, that's not the issue - but if
there's something native/basic I'm unaware of which could prevent the bug
(?) from triggering at all, that'd be good to know.)
3) (ideal case) I'm possibly overlooking something basic and stupid which
could explain and 'fix' this?

Thanks in advance!
~ Sander

Reply via email to