lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anshum <>
Subject Re: CANNOT use a * or ? symbol as the first character of a search.
Date Mon, 28 Dec 2009 09:02:08 GMT
Don't worry! there always are ways!
Is prefix query is what you are trying to run? They would run but would be
highly unoptimized as lucene stores terms in a lexically sorted manner in
its index. <term>* like query terms are allowed by the parser/searcher
Possible solution for this would be:
Index flipped terms (using an appropriate analyzer) i.e. cat is also indexed
as tac. You may then query on ta* instead of at*.
Does that solve your issues/concern?

Anshum Gupta
Naukri Labs!

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

On Mon, Dec 28, 2009 at 1:16 PM, liujb <> wrote:

> oh,my god,
> Query Parser Syntax
> CANNOT use a * or ? symbol as the first character of a search.
> that's mean I can't wrinte a search string like '*test'. this will be cause
> a great restriction to use lucence.
> but ,that's a really a important search scene.
> can you give me some advice on this problem.
> tks.
> owind.

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