:   q=samsung+camera
:
: And if samsung is mandatory, the query will be like this: (or not:)
:
:   q=+samsung+camera
:
: And the first + will be interpreted as mandatory flag?

No.  bottom line, forget all about URLs and URL escape.  step #1:
understand the Lucene query syntax...

   http://lucene.apache.org/java/docs/queryparsersyntax.html

in that syntax, this says samsung is mandatory and camera is optional...

        +samsung camera

Step #2: use the admin form in Solr to type in queries, check the
debug enable option to see exactly what query structures you are
getting at the botom of your results...

   http://localhost:8983/solr/admin/form.jsp

step#3: only after you are sure you understand the syntax, and what result
you ar getting as a result, should you look at the URL to see how the
Lucene query syntax is being URL escaped.

Solr doesn't do anything magic with the URL, it doesn't do any special
Solr specific parsing ... the URL must be legal, and it must be valid, it
will be parsed/unescaped just like any other CGI/form style URL .. and
then the args will be interpreted.

I've updated the wiki page that started this thread to try and eli8minate
any ambiguity about URL escaping...

http://wiki.apache.org/solr/CommonQueryParameters#fq


-Hoss

Reply via email to