lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hui" <...@triplehop.com>
Subject Re: AND instead OR for the search
Date Tue, 05 Aug 2003 19:14:13 GMT
Thank you, Erik. That is another question I want to ask.
But for this case, it is not the reason. The index created on Lucene 1.2
works fine for the standalone application. I tried calling the same testing
case within a simple jsp and it does not work. I also built an small index
within Lucene 1.3 API, the problem remains. Checked the source codes, it
seems the Searcher implementation does not pass it's reference sucessfully
to the Hits.

Regards,
Hui

----- Original Message -----
From: "Erik Hatcher" <lists@ehatchersolutions.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Tuesday, August 05, 2003 2:04 PM
Subject: Re: AND instead OR for the search


You should re-index using 1.3 when you upgrade the library to 1.3.  I
don't know the differences specifically (without doing some CVS diffs)
but there were some changes that affect the index format.

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" <cvwebmaster@noos.fr>
> To: <lucene-user@jakarta.apache.org>
> 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: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message