lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rohit saini" <mrrohitsa...@gmail.com>
Subject Re: urgent
Date Mon, 19 Nov 2007 04:52:23 GMT
Hi,
I think u may need to use escape function to escape the words which does not
come in searching....

Rohit


On 11/17/07, Shakti_Sareen <Shakti_Sareen@satyam.com> wrote:
>
> Hi
>
>
>
> I am facing problem in searching the word containing forward slash (/).
>
> My index file contains more then one documents.
>
> On searching for the word "U/S" in the claims field I am getting hits.
>
> But the word "U/S" is actually not there in the document.
>
>
>
> Below is the code I am using for searching.
>
> Analyzer analyzer = null;
>
>                                analyzer = new StandardAnalyzer();
>
>                                IndexSearcher searcher = new
> IndexSearcher(fIndexFolder.getAbsolutePath());
>
>                                QueryParser parser = new
> QueryParser("Claim",analyzer);
>
>                                Query query = parser.parse("U/S");
>
>
>                                Hits hits = searcher.search(query);
>
>                                LOGGER.info("Hits of word U/S in claims
> ::::::::  " + hits.length());
>
>                                for (int i = 0; i < hits.length(); i++)
> {
>
>                                                docum = hits.doc(i);
>
>                                                LOGGER.info("file NUMBER
> >>>>   " + docum.get("PatentNumber"));
>
>                                }
>
>
>
> Regards
> SHAKTI SAREEN
>
>
> DISCLAIMER:
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
> distribution or forwarding of any or all of the contents in this message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
VANDE - MATRAM

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