lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tarun sapra <>
Subject Re: Stopwords and Wildcards
Date Thu, 01 Jul 2010 17:58:50 GMT
You can use a PrefixQuery class instead of QueryParser ...and if you have
multiple terms in your queries you can use Boolean Query to add all the
terms and also you can write your own analyzer and in which you can override
stopfilter and give your own stop words.

On Wed, Jun 30, 2010 at 2:17 PM, Markus Mehrwald <> wrote:

> Hi,
> I use an AnalyzingQueryParser with the StandardAnalyzer and german
> stopwords in Lucene 3.0.1. If I have a query with a stopword followd by a
> wildcard (e. g. das*) I get a ParseException: Cannot build PrefixQuery with
> analyzer class org.apache.lucene.analysis.standard.StandardAnalyzer - token
> consumed.
> Without the wildcard it works. I can remove the stopwords before building
> the query of course but then I and the analyzer have to search for the stop
> words what might be not the best solution in my eyes.
> Is there any other way to get a proper result without writing code twice?
> Thanks,
> Markus
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Thanks & Regards
Tarun Sapra

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message