Hi,
I have been creating a repository with c# for elastic search.
Get function is like that:
var response = client.Search<TEntity>(s => s
.From(0)
.Size(10)
.Index(_indexName)
.Type(_typeName)
.Query(q => q.MatchAll() && query)
);
Create function is below:
_client.Index(entity, s => s
.Index(_indexName)
.Refresh());
When I run this code it creates a document, there is nothing with it. However, because I am using entitys and their names, when I pass the entity name through elastic search, it make the first character of type name lower. (e.g, User_Id => user_Id)
What I need to do is making all characters lower while creating the index and querying them with .ToLower().
So my question is, what is the best way to set elasticsearch case-insensitive for fields?
Thanks for your help in advance.
PS: I believe calling entity.Name.ToLower() on create() is not a good solution.