Reputation: 1702
I'm working on SolrNet 3.6 which is used in e-Commerce site based on ASP.NET MVC3 with C#.
There is one filter called "cpu socket type" and its values are
Solr is working properly when you filter with "AM2" but it is not working when you filter with "AM2+" or "AM3+". At same time we can not get any result or an error also. I know that this issue is related with special character but don't know how to handle this?
Upvotes: 1
Views: 1231
Reputation: 22555
According to the SolrNet Wiki Page on Querying, try using the SolrQueryByField
method as:
It also has the benefit that it handles special character escaping for you.
So your code would look similar to this, assuming your field was named cpusockettype
in your solr schema.xml file.
ISolrOperations<Item> solr = ...
var items = solr.Query(new SolrQueryByField("cpusockettype", "AM2+"));
Upvotes: 3