Wildcard, case insensitive searches with spaces

518 views
Skip to first unread message

Mark Meisel

unread,
Jan 30, 2012, 3:31:55 PM1/30/12
to SolrNet
Greetings,

I'm using SolrNet to perform wildcard, case insensitive searches
against a Solr core. I'm having difficulty with spaces in the search
term. For example, using the Solr admin interface through the browser
I'm able to run this query: Name:sample\ search*. A list of results
is returned. I'm having trouble getting this type of query to work in
SolrNet. At first, I did not escape any characters to the FieldValue
was sample search*'. That did not work. Next, I tried to escape the
characters which made FieldValue equal to 'sample\ search*'. At first
glance this is the correct search term, however, SolrNet returns no
results.

Does SolrNet encode/decode characters before it hits the Solr core?

Any thoughts?

Mauricio Scheffer

unread,
Feb 7, 2012, 2:20:58 PM2/7/12
to sol...@googlegroups.com
Hi Mark,

SolrQueryByField encodes by default the value. Encoding can be toggled with the Quoted property.
Alternatively, you can use SolrQuery, which doesn't encode any special characters.

--
Mauricio




--
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To post to this group, send email to sol...@googlegroups.com.
To unsubscribe from this group, send email to solrnet+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/solrnet?hl=en.


Reply all
Reply to author
Forward
0 new messages