lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Currens <currens.ch...@gmail.com>
Subject Re: how can I get the similarity in fuzzy query
Date Wed, 16 Feb 2011 19:32:05 GMT
I was going to post the link that Digy posted, which suggests not to
determine a match that way.  If my understanding is correct, the scores
returned for a query are relative to which documents were retrieved by the
search, in that if a document is deleted from the index, the scores will
change even though the query did not, because the number of returned
documents are different.

If the only thing you wanted to do was to calculate how a resulting string
was to a search string, I suggest the Levenshtein Distance algorithm
http://en.wikipedia.org/wiki/Levenshtein_distance...but it doesn't seem like
that's quite what you want to accomplish based on your question.

Christopher

On Wed, Feb 16, 2011 at 10:55 AM, Wen Gao <samuel.gaowen@gmail.com> wrote:

> Hi,
> I am using FuzzyQuery to get fuzzy mathed results. I want to get the
> similarity in percent for every matched record.
> for example, if i search for "databasd", and it will return results such as
> "database", "database1", and "database11". I want to get the similarity in
> percent for evey record, such as 87.5%, 75%, and 62.5%.
>
> How can I do this?
>
> Any ideas?
>
> Wen Gao
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message