lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
Subject Re: Question regarding using Lucene or not
Date Mon, 04 Oct 2004 20:49:48 GMT
On Monday 04 October 2004 22:22, you wrote:

> 1. How difficult it is to implement our own Similarity class that can do
> the things we want ?

It should be very easy. The API is described here:
I think in your case all methods (except one) that return a float can just 
return 1.0f. The one that doesn't return 1 then returns a value that 
represents the difference to the "perfect" value (well, more like 

> 2. If there are more than one field that are percentage match like HP,
> can we also specify which field gets the preference while search.

If you implement the method mentioned above so that it always ranks some 
field higher than another, that should be possible.

But it you've only got 1000 documents (and that number won't increase) you 
could also just search for HP:cargo, put all matches in your own "Match" 
objects and then sort these via your own implementation of Java's 



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message