lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Digy" <digyd...@gmail.com>
Subject RE: [Lucene.Net] reader.Terms order
Date Fri, 27 Jan 2012 23:14:29 GMT
Yes it is safe. This is the lucene's logic.

DIGY

-----Original Message-----
From: Trevor Watson [mailto:twatson@datassimilate.com] 
Sent: Friday, January 27, 2012 11:59 PM
To: lucene-net-user@lucene.apache.org
Subject: [Lucene.Net] reader.Terms order

Hello!

We populate a list of terms that users can filter with prefixes. (they 
type in a text box and as they type the list gets filtered).

I was curious, when using reader.Terms(), is there a specific order the 
terms come out in?

the code we use for it is
terms = reader.Terms(new Lucene.Net.Index.Term(fieldName, sPrefix))


The terms seem to be sorted alphabetically by field, so if we run past 
the end of the prefix or the end of the field, is it safe to believe 
that a term farther down the list won't match the field/prefix combination?


-----

Checked by AVG - www.avg.com
Version: 2012.0.1901 / Virus Database: 2109/4770 - Release Date: 01/27/12


Mime
View raw message