Hi all and thanks for your precedent help.

I've try the setOperator() method :

First I use this code :
QueryParser qp = new QueryParser("content", analyzer);
qp.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
query = qp.parse(queryString, "contents", analyzer);

But it does not work (Or is always use in the query).

Then, I look the QueryParser and we could use another parse() method:
That's my second code :
QueryParser qp = new QueryParser("content", analyzer);
qp.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
query = qp.parse(queryString);

And this work good :-)  (And is now use by default)

Hui : I think this could solve your problem.

Sébastien

Reply via email to