Erik
On Tuesday, August 5, 2003, at 11:48 AM, hui wrote:
Thank you, Sebastien. It works now.
I think most people are going to do the same thing when they upgrade to 1.3
by leaving the parse() method from 1.2 there since it is supported in 1.3.
I am having another problem now after I switched to 1.3 from 1.2. The web
application seach within Jboss 2.4/ Tomcat 3.1 does not work any more. But a
standalone application search works fine on the same index. The index was
created on Lucene 1.2. Here is the exception
[Default] java.lang.NullPointerException
[Default] at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:90)
[Default]
[Default] at org.apache.lucene.search.Hits.<init>(Hits.java:80)
[Default]
[Default] at
org.apache.lucene.search.Searcher.search(Searcher.java:71)
[Default]
[Default] at
org.apache.lucene.search.Searcher.search(Searcher.java:65)
Any idea about this?
Regards, Hui
----- Original Message ----- From: "Sebastien X" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 05, 2003 9:51 AM Subject: Re: AND instead OR for the search
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
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]