lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Storey, Jeff" <>
Subject RE: Partial Word Matches
Date Sat, 11 Nov 2006 20:50:48 GMT
For proprietary reasons, I cannot post code samples, but I can give you
more details as to what I am doing. I am basically trying to search a
directory of text files.

Step 1: Create an IndexWriter for the directory being searched.

Step 2: For each text file, create a new Document object and add the
document title and content as fields to this Lucene document. Add these
documents to the IndexWriter.

Step 3: Create a QueryParser and parse a user entered query.

Step 4: Create an IndexSearcher to search the directory created by the

Step 5: Use the search method of the IndexSearcher to search the parsed
query created in Step 3.

That's it. Is this the proper way to be doing searching?


-----Original Message-----
From: Paul Borgermans [] 
Sent: Saturday, November 11, 2006 3:06 PM
Subject: Re: Partial Word Matches

Indeed, the only way this can happen as far as I know Lucene is by using
stemmer during indexing, the standard analyzer won't result in such



On 11/11/06, Erick Erickson <> wrote:
> That's not the default behavior, so I'm perplexed. Normally, you have
> go
> to considerable effort to get partial matches....
> What analyzers are you using at both index and query time? Perhaps as
> short
> a code snippet as you could make showing this behavior would be a good
> thing
> to post. I flat guarantee folks will look at it. But please make it
> <G>.
> Best
> ERick
> On 11/11/06, Storey, Jeff <> wrote:
> >
> > Hi. I'm using Lucene to do some searching (using the Searcher object
> > passing it a ParsedQuery). I search for a word such as "long" and it
> > returning partial matches, such as "belong" and "along." Is there a
> > to turn off this behavior and only match whole words?
> >
> >
> >
> > Thank you,
> >
> > Jeff
> >
> >
> >
> >
> >


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message