lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smokey <smokey...@gmail.com>
Subject Re: Applying SpellChecker to a phrase
Date Tue, 11 Dec 2007 19:26:43 GMT
Thanks for pointing me to the right class to use.

On Dec 11, 2007 3:23 AM, Doron Cohen <DORONC@il.ibm.com> wrote:

> Yes that's right, my mistake.
>
> In fact even after reading your comment I was puzzled
> because PhraseScorer indeed requires *all* phrase-positions
> to be satisfied in order to match. The answer is that
> the OR logic is taken care of by MultipleTermPositions,
> so the scorer does not need to be aware of any of this.
>
> Anyhow, example usage of this is in TestMultiPhraseQuery.
>
> Doron
>
> Chris Hostetter <hossman_lucene@fucit.org> wrote on 11/12/2007 09:12:17:
>
> >
> > Isn't MultiPhraseQuery what is desired here?  you can add Term[]s per
> > position and at least one term in each array must much.
> >
> > : > I was thinking of parsing the phrase query string into a
> > : > sequence of terms,
> > : > then constructing a phrase query object using add(Term term,
> > : > int position)
> > : > method in org.apache.lucene.search.PhraseQuery class. Then
> > I can inject
> > : > similar words (suggested by SpellChecker) at appropriate
> > : > positions for each
> > : > term as I construct the final phrase query object.
> > : >
> > : > Do you agree that this should work too?
> > :
> > : I never tried this but I'm sure it will not work.
> > :
> > : The phrase query scorer requires all the terms to
> > : appear - either at the 'right' place or with slop
> > : for sloppy phrases. Therefore if you inject two
> > : terms in the same position the scorer will require
> > : to find both of them in the same position in order to
> > : match a document. This would be an AND logic, while
> > : what you need is an OR logic.
> >
> >
> >
> >
> >
> > -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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