You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Xavier To <to...@courrier.uqam.ca> on 2007/02/07 21:25:21 UTC
Re : Re: Question concerning Analyzers
Thanks Erik and Erick,
I guess my question was rather unclear, but you guys answered it all the same : it is impossible for an analyzer to index something and having the same analyzer ignore the thing indexed during a search.
If it makes everything clearer, during indexation, numbers are indexed, whether or not they are accompanied by letters ( 2003 and 4wd are both indexed). That's fine, since we want this. The problem occurs when I try to search for them : They are ignored. I know they are indexed because I ran through the index using Luke.
Any thoughts regarding this problem ?
Xavier Tô
Bacc. en Informatique et Génie Logiciel
to.xavier@courrier.uqam.ca
(450)434-8905
----- Message d'origine -----
De: Erik Hatcher <er...@ehatchersolutions.com>
Date: Mercredi, Février 7, 2007 3:15 pm
Objet: Re: Question concerning Analyzers
> There is no requirement that you use the same analyzer to search as
>
> you used to index. So, yes, you could certainly index things and
> ignore them during a search.
>
> Erik
>
>
> On Feb 7, 2007, at 2:10 PM, Xavier To wrote:
>
> > Hi, me again
> >
> > I'm still stuck with my search engine, but something popped in my
>
> > head : Can an analyzer index something but ignore it during a
> > search ? I'm asking this because now that I've been searching for
>
> > an answer, I've come to think that I should redo the whole search
>
> > engine, but I don't want to reproduce the same error as we have
> > now. It would be stupid to accidentaly redo the same mistake. I
> > still haven't received news from my seniors about me posting code
>
> > and all...
> >
> > Xavier Tô
> > Bacc. en Informatique et Génie Logiciel
> > to.xavier@courrier.uqam.ca
> > (450)434-8905
> >
> >
> >
> > ------------------------------------------------------------------
> ---
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> --------------------------------------------------------------------
> -
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Re : Re: Question concerning Analyzers
Posted by Erick Erickson <er...@gmail.com>.
Then the analyzer you're using when parsing the query is stripping them. It
must be different than the one you use when indexing somehow. At least
that's the only explanation I can imagine....
Perhaps, somehow, you are using a default analyzer when you parse a query?
Or you aren't specifying the field when you query and thus a default is
used? Or you are using a PerFieldAnalyzerWrapper and dropping through to the
default? or ????
Just for yucks, I'd try using WhitespaceAnalyzer on a query with something
you *know* exists in the index for a particular field and work my way up to
whatever your real problem is in small steps (since you can't post code
<G>)......
Best
Erick
On 2/7/07, Xavier To <to...@courrier.uqam.ca> wrote:
>
> Thanks Erik and Erick,
>
> I guess my question was rather unclear, but you guys answered it all the
> same : it is impossible for an analyzer to index something and having the
> same analyzer ignore the thing indexed during a search.
>
> If it makes everything clearer, during indexation, numbers are indexed,
> whether or not they are accompanied by letters ( 2003 and 4wd are both
> indexed). That's fine, since we want this. The problem occurs when I try to
> search for them : They are ignored. I know they are indexed because I ran
> through the index using Luke.
>
> Any thoughts regarding this problem ?
>
> Xavier Tô
> Bacc. en Informatique et Génie Logiciel
> to.xavier@courrier.uqam.ca
> (450)434-8905
>
> ----- Message d'origine -----
> De: Erik Hatcher <er...@ehatchersolutions.com>
> Date: Mercredi, Février 7, 2007 3:15 pm
> Objet: Re: Question concerning Analyzers
>
> > There is no requirement that you use the same analyzer to search as
> >
> > you used to index. So, yes, you could certainly index things and
> > ignore them during a search.
> >
> > Erik
> >
> >
> > On Feb 7, 2007, at 2:10 PM, Xavier To wrote:
> >
> > > Hi, me again
> > >
> > > I'm still stuck with my search engine, but something popped in my
> >
> > > head : Can an analyzer index something but ignore it during a
> > > search ? I'm asking this because now that I've been searching for
> >
> > > an answer, I've come to think that I should redo the whole search
> >
> > > engine, but I don't want to reproduce the same error as we have
> > > now. It would be stupid to accidentaly redo the same mistake. I
> > > still haven't received news from my seniors about me posting code
> >
> > > and all...
> > >
> > > Xavier Tô
> > > Bacc. en Informatique et Génie Logiciel
> > > to.xavier@courrier.uqam.ca
> > > (450)434-8905
> > >
> > >
> > >
> > > ------------------------------------------------------------------
> > ---
> > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
> > --------------------------------------------------------------------
> > -
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>