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 manjula wijewickrema <ma...@gmail.com> on 2010/05/07 10:52:47 UTC

Trace only exactly matching terms!

Hi,

I am using Lucene 2.9.1 . I have downloaded and run the 'HelloLucene.java'
class by modifing the input document and user query in various ways. Once I
put the document sentenses as 'Lucene in actions' insted of 'Lucene in
action', and I gave the query as 'action' and run the programme. But it did
not show me the 'Lucene in action as a hit'! What is the reason for this?
Why it doesn't tackle word 'actions' as a hit? Does Lucene identify only the
exactly matching words?

Thanks
Manjula

Re: Trace only exactly matching terms!

Posted by manjula wijewickrema <ma...@gmail.com>.
Hi Anshum & Erick,

As you have mentioned, I used SnowballAnalyzer for stemming purposes. It
worked nicely. Thnks a lot for your guidence.

Manjula.

On Fri, May 7, 2010 at 8:27 PM, Erick Erickson <er...@gmail.com>wrote:

> The other approach is to use a stemmer both at index and query time.
>
> BTW, it's very easy to make a "custom" analyzer by chaining together
> the Tokenizer and as many filters (e.g. PorterStemFilter), essentially
> composing your analyzer from various pre-built Lucene parts.
>
> HTH
> Erick
>
> On Fri, May 7, 2010 at 9:07 AM, Anshum <an...@gmail.com> wrote:
>
> > Hi Manjula,
> > Yes lucene by default would only tackle exact term matches unless you use
> a
> > custom analyzer to expand the index/query.
> >
> > --
> > Anshum Gupta
> > http://ai-cafe.blogspot.com
> >
> > The facts expressed here belong to everybody, the opinions to me. The
> > distinction is yours to draw............
> >
> >
> > On Fri, May 7, 2010 at 2:22 PM, manjula wijewickrema <
> manjula53@gmail.com
> > >wrote:
> >
> > > Hi,
> > >
> > > I am using Lucene 2.9.1 . I have downloaded and run the
> > 'HelloLucene.java'
> > > class by modifing the input document and user query in various ways.
> Once
> > I
> > > put the document sentenses as 'Lucene in actions' insted of 'Lucene in
> > > action', and I gave the query as 'action' and run the programme. But it
> > did
> > > not show me the 'Lucene in action as a hit'! What is the reason for
> this?
> > > Why it doesn't tackle word 'actions' as a hit? Does Lucene identify
> only
> > > the
> > > exactly matching words?
> > >
> > > Thanks
> > > Manjula
> > >
> >
>

Re: Trace only exactly matching terms!

Posted by Erick Erickson <er...@gmail.com>.
The other approach is to use a stemmer both at index and query time.

BTW, it's very easy to make a "custom" analyzer by chaining together
the Tokenizer and as many filters (e.g. PorterStemFilter), essentially
composing your analyzer from various pre-built Lucene parts.

HTH
Erick

On Fri, May 7, 2010 at 9:07 AM, Anshum <an...@gmail.com> wrote:

> Hi Manjula,
> Yes lucene by default would only tackle exact term matches unless you use a
> custom analyzer to expand the index/query.
>
> --
> Anshum Gupta
> http://ai-cafe.blogspot.com
>
> The facts expressed here belong to everybody, the opinions to me. The
> distinction is yours to draw............
>
>
> On Fri, May 7, 2010 at 2:22 PM, manjula wijewickrema <manjula53@gmail.com
> >wrote:
>
> > Hi,
> >
> > I am using Lucene 2.9.1 . I have downloaded and run the
> 'HelloLucene.java'
> > class by modifing the input document and user query in various ways. Once
> I
> > put the document sentenses as 'Lucene in actions' insted of 'Lucene in
> > action', and I gave the query as 'action' and run the programme. But it
> did
> > not show me the 'Lucene in action as a hit'! What is the reason for this?
> > Why it doesn't tackle word 'actions' as a hit? Does Lucene identify only
> > the
> > exactly matching words?
> >
> > Thanks
> > Manjula
> >
>

Re: Trace only exactly matching terms!

Posted by Anshum <an...@gmail.com>.
Hi Manjula,
Yes lucene by default would only tackle exact term matches unless you use a
custom analyzer to expand the index/query.

--
Anshum Gupta
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Fri, May 7, 2010 at 2:22 PM, manjula wijewickrema <ma...@gmail.com>wrote:

> Hi,
>
> I am using Lucene 2.9.1 . I have downloaded and run the 'HelloLucene.java'
> class by modifing the input document and user query in various ways. Once I
> put the document sentenses as 'Lucene in actions' insted of 'Lucene in
> action', and I gave the query as 'action' and run the programme. But it did
> not show me the 'Lucene in action as a hit'! What is the reason for this?
> Why it doesn't tackle word 'actions' as a hit? Does Lucene identify only
> the
> exactly matching words?
>
> Thanks
> Manjula
>