Hi,
Found the problem for this. I need to switch to JDK1.3.1 or above (jdk1.4)
to make Lucene 1.3 works. It just does not work with jdk 1.3.0
Regards,
Hui
----- Original Message -----
From: "hui" <[EMAIL PROTECTED]>
To: "Lucene Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 05, 2003 3:14 PM
Subject: Re: AND instead OR for the search
> 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" <[EMAIL PROTECTED]>
> To: "Lucene Users List" <[EMAIL PROTECTED]>
> 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" <[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]
>
>
> ---------------------------------------------------------------------
> 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]