lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Re[3]: Multiple fq fields in URL
Date Mon, 14 May 2007 01:39:54 GMT
Jack,


On May 13, 2007, at 6:45 PM, Jack L wrote:
> 1. I didn't understand the part above in your reply. If I search for
> samsung camera, the query should be like this in the select URL:
>
>   q=samsung+camera
>
> And if samsung is mandatory, the query will be like this: (or not:)
>
>   q=+samsung+camera

Or not.   You need that first plus encoded as %2b:

	q=%2bsamsung+camera

> And the first + will be interpreted as mandatory flag?

It is interpreted as a space.

Here's a good way to see how things get interpreted:

	/solr/select?q=+bob&wt=ruby&indent=on

You'll see the params in the responseHeader:

	'q'=>' bob'

> 6. I'm compelled to list both the non-escaped format and the escaped
> format above because I can not help thinking that the + may
> cause problems :)

It causes confusion, that's for sure.  We do have to be careful to  
note whether an example is an encoded URL, or whether its a loose  
example to keep from cluttering it up with encoded characters.

	Erik


Mime
View raw message