QueryParser and auto wildcard searches

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

QueryParser and auto wildcard searches

Gavin-2
Hello,

I am new to Lucene and I am trying to customise the query parser to default to wildcard searches.
For example, if the user types in "fenc", it should find "fence" and "fencing" and "fences" and "fenced".

I can not find a way to modify / extend the QueryParser to automatically create wildcard queries.

Note that the query will have multiple fields, grouping and all the other good stuff Lucene give us.

Thanks

Gavin

Reply | Threaded
Open this post in threaded view
|

Re: QueryParser and auto wildcard searches

Patrek
Hi!

I am new to Lucene and I am trying to customise the query parser to default
> to wildcard searches.
> For example, if the user types in "fenc", it should find "fence" and
> "fencing" and "fences" and "fenced".


 Looks like stemming to me! Maybe you should consider using a stemming
analyzer instead. Look for stemmer filter/analyzer in contrib.

Patrick