lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: Query multiple fields
Date Mon, 19 Nov 2007 03:14:23 GMT
On Nov 18, 2007 9:58 PM, Dave C. <daft.davy@hotmail.com> wrote:
> According to the Lucene query syntax:
> "The symbol && can be used in place of the word AND."   So, I shouldn't have
to use 'AND'.

Yes, but before the query parser can even get the query string, the
servlet container parses query args and & is a delimiter.  Hence you
need to escape '&' for the sake of the servlet container.

> If I do the same query: q=description:(test)&&!(type:10)&&!(type:14)
in the Solr admin interface, I get the correct results.

Right, because the browser knows to escape '&' for you.

You need to escape '&' as %26, since that is how URL escaping works
(it has nothing to do with lucene syntax.)

-Yonik

Mime
View raw message