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 <[email protected]> wrote: > 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 20:39, Robert Muir <[email protected]> wrote: > >> On Fri, Mar 4, 2011 at 2:12 PM, Patrick Diviacco >> <[email protected]> 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). >> > >> > Should I create a customSimilarity class implementing the >> SimilarityProvider >> > and then implement the get method ? >> > >> > Also, inside the get method should I check the passed string field and >> > return different custom similarities classes ? >> >> yes, the SimilarityProvider is a factory interface that returns a >> Similarity for a specified field. >> >> So you have to implement this interface, and in your get(String field) >> method return the appropriate Similarity for the field. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> >
