lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Concatinated search string in not working!
Date Fri, 03 Sep 2004 13:55:29 GMT

Trying to search by two fields I got nothing.

The fields where  created like:

String provider =....
doc.add(Field.Keyword("provider", provider));
InputStreamReader input = new InputStreamReader( new ByteArrayInputStream(
contents ) );
document.add(Field.Text("contents", input ));

Searching code looks like:

   public class NeisQueryParser extends QueryParser{
            super("contents", analyzer); // PorterStemAnalyzer is used
   line= "Diovan and provider:NewsEdge";

   NeisQueryParser nqp=new NeisQueryParser();
   if (and) nqp.setOperator(NeisQueryParser.DEFAULT_OPERATOR_AND);
   else     nqp.setOperator(NeisQueryParser.DEFAULT_OPERATOR_OR);
   Query query = nqp.parse(line);

   hits =, getCurrentTimeFilter());

The parsing query  comes like

+contents:diovan +provider:newsedg

what I realy not undestand, because the "provider" field should not be

In case the line ="Diovan" I see results. Provider field I see as well
containing  "NewsEdge".

What I do wrong? Please help.


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

View raw message