Java provides one.  You probably want to use utf-8 as the encoding scheme.

http://java.sun.com/javase/6/docs/api/java/net/URLEncoder.html

Note you also will want to strip or escape character that are meaningful in the Solr/Lucene query syntax.
http://lucene.apache.org/java/2_4_0/queryparsersyntax.html#Escaping%20Special%20Characters

-Sean

On 5/25/2010 1:20 PM, JohnRodey wrote:
I would like to leverage on whatever SOLR provides to properly url-encode a
search string.

For example a user enters:
"mr. bill" oh no

The URL submitted by the admin page is:
http://localhost:8983/solr/select?indent=on&version=2.2&q=%22mr.+bill%22+oh+no&fq=&start=0&rows=10&fl=*%2Cscore&qt=standard&wt=standard&explainOther=&hl.fl=

Since the admin page uses it I would image that this functionality is there,
but having some trouble finding it.

Reply via email to