[
https://issues.apache.org/jira/browse/SOLR-18019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18043723#comment-18043723
]
Chris M. Hostetter commented on SOLR-18019:
-------------------------------------------
[~houston] ...
* do we already have a test that indexes some doc X w/o any float values, and
another doc Y with an explicit {{NaN}} value, and then runs an "exists" query
that should find Y but not X ?
** at a glance, I'm not finding one
* If i were to try to "break" your impl (so that it did *NOT* find {{NaN}} by
modifying your overridden {{getSpecializedExistenceQuery}} to use
{{FloatPoint.newRangeQuery(field.getName(), Float.NEGATIVE_INFINITY,
Float.POSTIVE_INFINITY)}} would that test fail?
The reason i ask is that even though "NaN is numerically sorted after
+Infinity" at a double & float level – i'm not certain if it's true at a Lucene
({_}encoded{_}) points level.
Particularly since the docs for {{FloatPoint.newRangeQuery}} indicate that
using {{Float.POSTIVE_INFINITY}} as an upper limit is already equivalent to an
"open ended" range query – making me concerned that (at a lucene encoded points
level) even an open ended range query still won't find {{NaN}} ... so why would
a bounded range query (with a bound "greater" then "open ended") find that
value?
(maybe {{field:[* TO *]}} is in fact "enough" and the {{OR field:NaN}} has
always been unneccessary?)
Either way – If we're going to say this "exists" query structure can find docs
with the value {{{}NaN{}}}, i'd really love to make sure we actually have a
test that *proves* this "exists" query structure can find docs with the value
{{NaN}}
> FloatPointField and DoublePointField can have improved non-DocValue existence
> queries
> -------------------------------------------------------------------------------------
>
> Key: SOLR-18019
> URL: https://issues.apache.org/jira/browse/SOLR-18019
> Project: Solr
> Issue Type: Improvement
> Reporter: Houston Putman
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently all double or float fields (trie and point) use (field:[* TO *] OR
> field:NaN) to represent non-DocValue existence queries. However since NaN is
> numerically sorted after +Infinity, we can use this to our advantage and
> just issue a field:[-Infinity TO NaN] range query for point fields.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]