You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by xx28 <xx...@drexel.edu> on 2003/04/24 19:13:04 UTC

code bug?

Hi,

I am using Lucene 1.2 web application. Most of queries work fine. However,when 
I tried to use phrase query like the following:

"basic service"

The fist result page is good (url like 
httP://com:8080/results.jsp?query=%22basic+service%22&db=dd&maxresults=20).

The page contains:
<a href="results.jsp?query="basic service"&maxresults=20&startat=20">More 
Results>></a>

If click More Results, error occurs since url changes to: 
http://com:8080/results.jsp?query=
No query at all.

Then I tried query:
qptional +basic +service

The result page url is 
http://com:8080/results.jsp?query=optional+%2Bbasic+%2Bservice&db=dd&maxresults=20
It contains 
<a href="results.jsp?query=optional +basic 
+service&maxresults=20&startat=20">More Results>></a>

Clicking on More Results, the url changed to:
http://com:8080/results.jsp?query=optional+basic+service&maxresults=20&startat=20
and the result is different(for example, the total hits) since the query has 
changed.

I am not sure anybody has the similar problem? Looks like need queryPreparser?

Regards, 


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


Re: code bug?

Posted by Otis Gospodnetic <ot...@yahoo.com>.
This is an issue with encoding of queries in HTML/URL-context.
If this is happening in your web application, it's something you need
to fix by, for instance, doign soemthing like java.net.URL.encode(query
string here) before stuffing it in ht HREF.
Or something similar...
This is not a Lucene problem.

Otis


--- xx28 <xx...@drexel.edu> wrote:
> Hi,
> 
> I am using Lucene 1.2 web application. Most of queries work fine.
> However,when 
> I tried to use phrase query like the following:
> 
> "basic service"
> 
> The fist result page is good (url like 
>
httP://com:8080/results.jsp?query=%22basic+service%22&db=dd&maxresults=20).
> 
> The page contains:
> <a href="results.jsp?query="basic
> service"&maxresults=20&startat=20">More 
> Results>></a>
> 
> If click More Results, error occurs since url changes to: 
> http://com:8080/results.jsp?query=
> No query at all.
> 
> Then I tried query:
> qptional +basic +service
> 
> The result page url is 
>
http://com:8080/results.jsp?query=optional+%2Bbasic+%2Bservice&db=dd&maxresults=20
> It contains 
> <a href="results.jsp?query=optional +basic 
> +service&maxresults=20&startat=20">More Results>></a>
> 
> Clicking on More Results, the url changed to:
>
http://com:8080/results.jsp?query=optional+basic+service&maxresults=20&startat=20
> and the result is different(for example, the total hits) since the
> query has 
> changed.
> 
> I am not sure anybody has the similar problem? Looks like need
> queryPreparser?
> 
> Regards, 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

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