Michael,

I am using the standard analyzer eith no stop words, and is build from an
existing lucene index.

org.apache.lucene.search.suggest.analyzing.AnalyzingInfixSuggester

I am overriding the addContextToQuery to make it an AND rather than an OR

public void addContextToQuery(Builder query, BytesRef context, Occur
clause) {
        query.add(new TermQuery(new Term(CONTEXTS_FIELD_NAME, context)),
                BooleanClause.Occur.MUST);
    }

Cheers Greg

On 27 January 2017 at 18:20, Michael McCandless <luc...@mikemccandless.com>
wrote:

> Which suggester are you using?
>
> Maybe you are using a suggester with an analyzer, and your analysis
> chain includes a StopFilter and "will" is a stop word?
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Fri, Jan 27, 2017 at 10:42 AM, Greg Huber <gregh3...@gmail.com> wrote:
> > Hello,
> >
> > Is there anyway to see why items are returned from the suggester?
> Similar
> > to the search.
> >
> > I have a really strange case where if I enter 'will' (without the quotes)
> > it seems to return all the search results.
> >
> > example:
> >
> > there should be two entries beginning with will*  ie william and
> Willoughby
> >
> > wil >  two entries with correct highlight
> > will > all entries with NO highlight
> > willi > single entry
> > willo > single entry
> >
> > I have checked and I do not have will on all the entries!
> >
> > Cheers Greg
>

Reply via email to