Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to search using fields which has blank spaces in name in SolrNet?

Tags:

solr

solrnet

I'm working on SolrNet 3.6 with ASP.NET MVC3 C#. There are blank species in several field's name in indexed data.
So when we trying to search using these type of fields, got an empty result.

e.g fields name is like 'Product Name' Now I want to search 'HTC' in 'Product Name' field,
so query string is like 'Product Name:HTC'. When I'm trying to do same,got an empty result.But actually there are lots of products related to this Name.

So,How to search using fields which has blank spaces in name?

like image 414
Dharmik Bhandari Avatar asked Feb 02 '26 12:02

Dharmik Bhandari


1 Answers

You can escape the space as shown below:

Product\ Name:HTC
like image 174
manojlds Avatar answered Feb 05 '26 04:02

manojlds



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!