protected QueryBase VisitMatches(MatchesNode node, ElasticQueryMapperState state) { // TODO: Move these 3 lines to separate method for reuse? var fieldName = GetFormattedFieldName(node); var valueNode = node.GetValueNode <string>(); var value = ValueFormatter.FormatValueForIndexStorage(valueNode.Value, fieldName); // TODO: RegexOptions - does Elastic support this? return(new RegexpQuery { Field = fieldName, Value = value.ToStringOrEmpty(), Boost = node.Boost }); }