You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Aruna Raghavan <Ar...@opin.com> on 2002/02/18 16:51:39 UTC

Phrase Query

Hello All,
Question on phrase queries-
I have a medical reports document that has "Anesth, Knee" in it.
If I use phrase query, it works but so does "Anesth Knee" (notice that the
comma is missing.)

Does Lucene remove special characters before indexing the documents?

Thanks!

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Phrase Query

Posted by Winton Davies <wd...@cs.stanford.edu>.
Yep, look for the Tokenizer/Analyzer code.  I believe it removes all 
non-alpha/numeric.

Cheers,
  Winton

>Hello All,
>Question on phrase queries-
>I have a medical reports document that has "Anesth, Knee" in it.
>If I use phrase query, it works but so does "Anesth Knee" (notice that the
>comma is missing.)
>
>Does Lucene remove special characters before indexing the documents?
>
>Thanks!
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


-- 

Winton Davies
Lead Engineer, Overture (NSDQ: OVER)
1820 Gateway Drive, Suite 360
San Mateo, CA 94404
work: (650) 403-2259
cell: (650) 867-1598
http://www.overture.com/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Phrase Query

Posted by Ian Lea <ia...@blackwell.co.uk>.
> Hello All,
> Question on phrase queries-
> I have a medical reports document that has "Anesth, Knee" in it.
> If I use phrase query, it works but so does "Anesth Knee" (notice that the
> comma is missing.)
> 
> Does Lucene remove special characters before indexing the documents?

Depends on the Analyzer you use.  Some certainly do, including
StandardAnalyzer.  You can build your own analyzer if you have
special requirements.



--
Ian.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>