Erick Erickson wrote:
Are you using NumberTools both at index and query time? Because
this works exactly as I expect
Yes, the code I posted showed the usage of NumberTools -- here it is
from my 2nd reply:
Taking your advice I'm now indexing using:
document.add( new Field(RateUtils.SF_F
An alternative to Lucene's NumberTools, is Solr's NumberUtils, which is more
space efficient for indexing numbers, but not as pretty to look at
http://lucene.apache.org/solr/api/org/apache/solr/util/NumberUtils.html
Dan Hardiker wrote:
> Hi,
>
> I've got an application which stores ratings fo
Are you using NumberTools both at index and query time? Because
this works exactly as I expect
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import
Erick Erickson wrote:
Although I'm a bit puzzled by what you're actually getting back.
You might try using Luke to look at your index to see what's
there.
I've looked through with Luke and it doesn't look like much has changed
between using NumberTools and not. NumberTools definitely does some
Yep, lucene works with strings, not numbers so the fact that you're
not getting what you expect is expected .
Although I'm a bit puzzled by what you're actually getting back.
You might try using Luke to look at your index to see what's
there.
See the NumberTools class for some help here...
B
Hi,
I've got an application which stores ratings for content in a Lucene
index. It works a treat for the most part, apart from the use-case I
have for being able to filter out ratings that have less than a given
number of rates. It kinda works, but seems to use Alpha ranging rather
than Numer