Search code examples
solrsolrnet

How to search using fields which has blank spaces in name in 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?


Solution

  • You can escape the space as shown below:

    Product\ Name:HTC