On 9/11/2018 10:15 PM, Zahra Aminolroaya wrote:
Thanks Erick. We used to use TrieLongField for our unique id and in the
document it is said that all Trie* fieldtypes are casting to
*pointfieldtypes. What would be the alternative solution?
I've never heard of Trie casting to Point.
Point is the recommended replacement for *similar* but not *identical*
functionality to what Trie provides.
Point fields are excellent at range queries (as an example, field:[500
TO 1000]) ... but they are terrible for single value lookups (such as
id:75224575). They do not work for the uniqueKey. I suspect that the
aspect that makes them terrible at single-value lookups is the same
aspect that prevents their use as uniqueKey, but I'm not familiar enough
with the low level details to be able to say for certain.
Trie is also excellent for range queries, but not as good as Point. It
is very fast at single-value lookups, and can be used as uniqueKey.
Using a string type (class solr.StrField) is one workaround for the
uniqueKey problem. It allows fast single-value lookups, but you lose
the ability to do numeric range queries. The string type sorts
alphanumerically, not numerically.
You can keep using Trie for all 7.x versions, but that type will be gone
in 8.0. Hopefully by that release the limitations in Point types will
be removed. You'll probably have to reindex if that happens, especially
if the problem is fixed by adding a new set of field types instead of
altering the existing Point types.
Thanks,
Shawn