Reputation: 9879
Using NEST+ElasticSearch, I suspect that characters which require special encoding aren't handled properly. Example: this doesn't return any results
var results =
client.Search<MyClass>(s => s.Query(q => q.Term(t => t.ProgrammingLanguage, "C#")));
but works fine after replacing "C#" with, for example, "Ruby". Looking at the index, there should be results for both searches.
Known issue? Is there a workaround?
Upvotes: 1
Views: 478
Reputation: 13536
This is not an encoding issue but more or less how lucene and by proxy elasticsearch works.
The default analyzer will split words and so C# will become just 'c'. Look into elasticsearch analyzers so that your field data is stored as is using something like the keyword analyzer.
see http://www.elasticsearch.org/guide/reference/index-modules/analysis/ for more info
Upvotes: 2