lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Rochkind <rochk...@jhu.edu>
Subject RE: When to use trie over standard
Date Fri, 13 May 2011 15:25:25 GMT
Well, let's be clear about what we're talking about. The suggested numeric and date fields
in the current Solr example schema are in fact ALL Trie based fields. http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/conf/schema.xml?view=markup

I don't think there is any downside to using a Trie-based field.  Trie based fields make for
quicker range queries (or greater-than/less-than queries, the same thing), with no downside.


The old non-trie based fields are marked in the example schema are all marked "should only
be used for compatibility with existing indexes." So the 'standard' fields are in fact all
Trie-based fields now. 

Now, here's the thing though, using a Trie-based field, you still have a choice about the
'precision'.  The example schema includes trie-based fields with 0-precision (int, float,
long, double, date), and trie-fields with greater than 0 precision (tint, tfloat, tdouble,
tlong, date).  You can also create your own field defintions for trie fields with the precision
of your choice, you aren't limited to what's set for tint etc in the example schema.xml. 

So the real question might be how to decide what precision on trie fields is appropriate for
your data and use cases. I am not exactly sure of the answer to that, but it _probably_ won't
matter that much for many data/use-cases. So one answer is, don't worry too much about it
unless you are seeing performance problems on range queries. I know I've seen something written
explaining what a trie field is and what the precision means in the context of Solr, but I
can't seem to find it now. 


________________________________________
From: Mark [static.void.dev@gmail.com]
Sent: Friday, May 13, 2011 11:14 AM
To: solr-user@lucene.apache.org
Subject: When to use trie over standard

When should one use Trie fields over the standard fields? What aret the
pro's and con's of each?

Thanks

Mime
View raw message