lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ranjit Kumar <Ranjit.Ku...@otssolutions.com>
Subject lucene3.0.3 | get correct document in case of multiple Boolean query in search criteria
Date Fri, 18 Feb 2011 16:15:56 GMT
hi,

I am using query like

criteria = (sql OR sqlserver OR "sql server") AND java AND delphi .

In this case when i am using default parser as code mention below:

QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, field, analyzer);

Query query = parser.parse(criteria);

I am getting same number of document when i am using QueryParser.OR_OPERATOR in code below:

QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, field, analyzer); parser.setDefaultOperator(QueryParser.OR_OPERATOR);

Query query = parser.parse(criteria);

which is not correct. please! suggest me feasible solution.

how could get correct document in case of multiple Boolean query in search criteria?


Thanks & Regards,
Ranjit Kumar
===================================================================================================
Private, Confidential and Privileged. This e-mail and any files and attachments transmitted
with it are confidential and/or privileged. They are intended solely for the use of the intended
recipient. The content of this e-mail and any file or attachment transmitted with it may have
been changed or altered without the consent of the author. If you are not the intended recipient,
please note that any review, dissemination, disclosure, alteration, printing, circulation
or Transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited
and may be unlawful. If you have received this e-mail or any file or attachment transmitted
with it in error please notify OTS Solutions at info@otssolutions.com ===================================================================================================

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