lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <>
Subject Re: prefix query search problem if a hyphen exist in the search word
Date Tue, 27 Nov 2007 15:23:53 GMT
What analyzers are you using both at index time and
query time? StandardAnalyzer will, for instance, split
the words at the hyphen.

I would recommend that you get a copy of Luke (google
lucene luke) and examine both the contents of your index,
and the query produced by using various analyzers. Also,
query.toString() will show you a lot about
what is actually happening.


On Nov 27, 2007 2:47 AM, reeja <> wrote:

> Hi,
>  I faced some problem with prefix query search when the prefix text
> contains
> a hyphen. i'm using lucene-2.1.
> Search query is like this ttl:co-operative it returns more than 50
> results,
> but if i convert the query like this ttl:co-operat* it  returns no result.
> again i entered a query ttl:11-amino it returns some results, then
>  changed
> the above query into ttl:11-amino* it will return some more results than
> previous query.
> I think if a character or text appeared before the hyphen may  cause the
> pbroblem, if the text before hyphen is a number its work fine.
> anybody can help me to correct this problem.
> Thanks
> reeja
> --
> View this message in context:
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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