Nevermind, I've finally solved.
I just now need to figure out how to retrieve the scores per fields in my
results.
I need to know how much similar each field is. I know I can use explain()
but it slows down computations...
thanks
On 4 March 2011 21:21, Patrick Diviacco wrote:
> ok thanks, one
ok thanks, one last thing: in my TimeSimilarity class, I just need to use
this formula:
queryTimeValue - DocTimeValue / normalizationFactor
to compute the similarity score of a time/date field.
How do you suggest to implement this ? Which methods do I need to overwrite
?
thanks
On 4 March 2011
On Fri, Mar 4, 2011 at 2:12 PM, Patrick Diviacco
wrote:
> hey Robert,
>
> I know there is the documentation, I'm sorry I've confused setSimilarity
> with setSimilarityProvider.
>
> However, my question was about "Similarity get(String field) method" (I
> cannot understand from documentation sorry)
hey Robert,
I know there is the documentation, I'm sorry I've confused setSimilarity
with setSimilarityProvider.
However, my question was about "Similarity get(String field) method" (I
cannot understand from documentation sorry).
Should I create a customSimilarity class implementing the Similari
On Fri, Mar 4, 2011 at 1:18 PM, Patrick Diviacco
wrote:
> So far, I know I can customize the similarity class for the searcher:
> searcher.setSimilarity(new BoostingSimilarity());
>
This is not correct.. have you read the javadocs?
IndexSearcher doesn't have a setSimilarity() anymore, it has
set
All right.
So it is still not clear how to exactly implement it.
I have SimilarityA and SimilarityB subclasses.
So far, I know I can customize the similarity class for the searcher:
searcher.setSimilarity(new BoostingSimilarity());
When/how should I use get method ?
Similarity get(String field)
On Thu, Mar 3, 2011 at 10:25 AM, Patrick Diviacco
wrote:
> I've downloaded Lucene nightly build because I need to customize the
> similarity *per field*.
>
> However I don't see the field parameter passed to the methods to compute the
> score such as "tf" and "idf"...
>
> how can I implement diffe
I've downloaded Lucene nightly build because I need to customize the
similarity *per field*.
However I don't see the field parameter passed to the methods to compute the
score such as "tf" and "idf"...
how can I implement different similarities score per document field then ?
thanks