You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Torsten Krah <kr...@gmail.com> on 2017/12/11 12:06:41 UTC
solr.TrieDoubleField deprecated with 7.1.0 but wildcard "*" search
behaviour is different with solr.DoublePointField
Hi,
some question about the new DoublePointField which should be used
instead of the TrieDoubleField in 7.1.
https://lucene.apache.org/solr/guide/7_1/field-types-included-with-solr.html
If i am using the deprecated one its possible to get a match for a
double field like this:
test_d:*
even in 7.1.0.
But with the new DoublePointField, which you should use instead, you
won't get that match - you have to use e.g. [* TO *].
Short recipe can be found here to have a look yourself:
https://stackoverflow.com/questions/47473188/solr-7-1-querying-double-field-for-any-value-not-possible-with-anymore/47752445
Is this an intended change in runtime / query behaviour or some bug or
is it possible to restore that behaviour with the new field too?
kind regards
Torsten
Re: solr.TrieDoubleField deprecated with 7.1.0 but wildcard "*"
search behaviour is different with solr.DoublePointField
Posted by Chris Hostetter <ho...@fucit.org>.
AFAICT The behavior you're describing with Trie fields was never
intentionally supported/documented?
It appears that it only worked as a fluke side effect of how the default
implementation of FieldType.getprefixQuery() was inherited by Trie fields
*and* because "indexed=true" TrieFields use Terms (just like StrField) ...
so prefix of "" (the empty string) matched all of the Trie terms in a
field.
(note that the syntax you're describing does *not* work for Trie fields
that are "indexed=false docValues=true")
In general, there seems to be a bit of a mess in terms of trying to
specify "prefix queries" (which is what "foo_d:*" really is under the
covers) or "wild card" queries against numeric fields. I created a jira to
try and come to a concensus about how this should behave moving forward...
https://issues.apache.org/jira/browse/SOLR-11746
...but i would suggest you move away from depending on that syntax and use
the officially supported/documented range query syntax (foo_d[* TO *])
instead.
: some question about the new DoublePointField which should be used
: instead of the TrieDoubleField in 7.1.
...
: If i am using the deprecated one its possible to get a match for a
: double field like this:
:
: test_d:*
:
: even in 7.1.0.
:
: But with the new DoublePointField, which you should use instead, you
: won't get that match - you have to use e.g. [* TO *].
....
: Is this an intended change in runtime / query behaviour or some bug or
: is it possible to restore that behaviour with the new field too?
-Hoss
http://www.lucidworks.com/