Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User
urgent
 

Index | Next | Previous | View Flat


Shakti_Sareen at satyam

Nov 17, 2007, 4:46 AM


Views: 289
Permalink
urgent

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[at]lucene.apache.org
For additional commands, e-mail: java-user-help[at]lucene.apache.org

Subject User Time
urgent Shakti_Sareen at satyam Nov 17, 2007, 4:46 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.