Hi,

I've an index : each document is indexed with 2 fields named "content" and "title".

To make my search, I use this code :
QueryParser qp = new QueryParser("content", analyzer);

My interrogation is :
if I use the QueryParser("content", analyzer) and I make a search like this in my 
query " title : mysearch", is the exact same thing than if I use the 
QueryParser("title", analyzer) and I make the search " mysearch"  ?
I suppose that yes, but someone could confirm that?
Is there a methode to make my search automatically with the 2 fields? for the moment, 
I use this code :
        QueryParser qp = new QueryParser("content", analyzer);
        qp.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
        query = qp.parse("("+queryString+") OR title:("+queryString+")");
Is it the good way?


Thanks in advance

Reply via email to