Hi,
I have documents with most fields indexed as 'Keywords'. I currently want to perform a global search, over all indexed fields, which I've implemented as such:
var result = await client.SearchAsync<PersonRecord>(s => s
.Query(q => q
.MultiMatch(m => m
.Query("jo")
.Type(TextQueryType.BoolPrefix)
));
This gives me all documents with any value starting with 'jo'.
What's the best way to convert this prefix query in a 'contains' search? So that all documents are returned with any value matching with '*jo*'.
I already found out about Wildcard queries, but these are not compatible with the MultiMatch query.
An other solution would be indexing these fields using a nGram tokenizer, but doing this for all fields would increase the needed storage, since more tokens will be added.
Any tips or pointers to direct me towards a more ideal implementation?