protected virtual QueryNode VisitWildcardMatch(WildcardMatchNode node, ElasticSearchQueryOptimizerState state)
        {
            state.Boost = 1f;
            var node2 = Visit(node.LeftNode, state);

            return(new WildcardMatchNode(node2, Visit(node.RightNode, state), state.Boost));
        }
        protected BaseQuery HandleWildcardMatch(WildcardMatchNode node, ElasticSearchQueryMapperState mappingState)
        {
            var fieldName = GetFormattedFieldName(node);
            var valueNode = QueryHelper.GetValueNode <string>(node);

            var queryValue = ValueFormatter.FormatValueForIndexStorage(valueNode.Value);

            //TODO: same as the HandleContains method... is there a better way to do this without wildcard queries?
            return(Query.Wildcard(fieldName, queryValue.ToString()));
        }
        protected QueryBase VisitWildcardMatch(WildcardMatchNode 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);

            return(new WildcardQuery
            {
                Field = fieldName,
                Value = value.ToStringOrEmpty(), // TODO: StartsWith can only be done on strings (?) so it should actually already always be a string
                Boost = node.Boost
            });
        }
 protected virtual QueryNode VisitWildcardMatch(WildcardMatchNode node, AzureQueryOptimizerState state)
 {
     return((QueryNode) new WildcardMatchNode(this.Visit(node.LeftNode, state), this.Visit(node.RightNode, state), state.Boost));
 }