lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitri Mamrukov" <>
Subject Re: Searching for -
Date Tue, 02 Dec 2003 17:18:24 GMT
Hi Iain,

There was a discussion about Dash Confusion in QueryParser (search for
"t-shirt" - with quota symbols! - or Dash Confusion). They suggested to
escape such words by putting quota symbols around them. For instance, ask
your application "DISP-NAME" instead of DISP-NAME.


----- Original Message ----- 
From: "Iain Young" <>
To: "Lucene mailing list (E-mail)" <>
Sent: Tuesday, December 02, 2003 12:01 PM
Subject: Searching for -

> Hi folks, another newbie question for you.
> I'm using Lucene to index huges chunks of source code, (cobol, jcl, c,
> text documents etc). In some of these languages (such as cobol) it is
> to have a variable name of DISP-NAME for example. The problem I have is
> when you enter this search string into the lucene query engine, it reads
> - character as a "NOT" modifier rather than as part of the word, and so
> getting incorrect results, (it basically does a search for DISP NOT NAME).
> Anyone any ideas as to how to get around this (can you 'escape' the
> characters so that Lucene doesn't interpret them as such for example)?
> Thanks,
> Iain Young
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message