I want to implement full-text search and tokenized search using NEST, so I want to get multi-field as follows:
"tweet": { "properties": { "message": { "type": "string", "store": true, "fields": { "raw": { "type": "string", "index": "not_analyzed" } } } } }
My current mapping to NEST is currently
[ElasticType(Name = "tweet")] internal class Tweet { [ElasticProperty(Name = "message")] public string Message { get; set; }
I searched the documentation for NEST and ElasticSearch.net, but nothing worked.
Is there any option to automatically get the raw field inside the field, or should I define a nested class and specify the source field for myself (I would prefer a cleaner way)?
elasticsearch nest
Folosse
source share