public override Query GetQuery(string query, ICommonQueryParserConfiguration cqpC) { Debug.Assert(cqpC != null, "Parameter must not be null"); Debug.Assert(cqpC is QueryParser, "Parameter must be instance of QueryParser"); QueryParser qp = (QueryParser)cqpC; return qp.Parse(query); }
public override Query GetQuery(String query, ICommonQueryParserConfiguration cqpC) { Debug.Assert(cqpC != null, "Parameter must not be null"); Debug.Assert((cqpC is StandardQueryParser), "Parameter must be instance of StandardQueryParser"); StandardQueryParser qp = (StandardQueryParser)cqpC; return Parse(query, qp); }
public void AssertDateRangeQueryEquals(ICommonQueryParserConfiguration cqpC, string field, string startDate, string endDate, DateTime endDateInclusive, DateTools.Resolution resolution) { AssertQueryEquals(cqpC, field, field + ":[" + EscapeDateString(startDate) + " TO " + EscapeDateString(endDate) + "]", "[" + GetDate(startDate, resolution) + " TO " + GetDate(endDateInclusive, resolution) + "]"); AssertQueryEquals(cqpC, field, field + ":{" + EscapeDateString(startDate) + " TO " + EscapeDateString(endDate) + "}", "{" + GetDate(startDate, resolution) + " TO " + GetDate(endDate, resolution) + "}"); }
public override void SetDefaultOperatorOR(ICommonQueryParserConfiguration cqpC) { if (Debugging.AssertsEnabled) { Debugging.Assert(cqpC is StandardQueryParser); } StandardQueryParser qp = (StandardQueryParser)cqpC; qp.DefaultOperator = (Operator.OR); }
public override void SetAnalyzeRangeTerms(ICommonQueryParserConfiguration cqpC, bool value) { if (Debugging.AssertsEnabled) { Debugging.Assert(cqpC is QueryParser); } QueryParser qp = (QueryParser)cqpC; qp.AnalyzeRangeTerms = (value); }
public override void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value) { if (Debugging.AssertsEnabled) { Debugging.Assert(cqpC is QueryParser); } QueryParser qp = (QueryParser)cqpC; qp.AutoGeneratePhraseQueries = value; }
public override void SetDefaultOperatorAND(ICommonQueryParserConfiguration cqpC) { if (Debugging.AssertsEnabled) { Debugging.Assert(cqpC is QueryParser); } QueryParser qp = (QueryParser)cqpC; qp.DefaultOperator = Operator.AND; }
public override void SetDateResolution(ICommonQueryParserConfiguration cqpC, string field, DateTools.Resolution value) { if (Debugging.AssertsEnabled) { Debugging.Assert(cqpC is QueryParser); } QueryParser qp = (QueryParser)cqpC; qp.SetDateResolution(field, value); }
public override void SetDateResolution(ICommonQueryParserConfiguration cqpC, string field, DateResolution value) { if (Debugging.AssertsEnabled) { Debugging.Assert(cqpC is StandardQueryParser); } StandardQueryParser qp = (StandardQueryParser)cqpC; qp.DateResolutionMap.Put(field, value); }
public override Query GetQuery(string query, ICommonQueryParserConfiguration cqpC) { if (Debugging.AssertsEnabled) { Debugging.Assert(cqpC != null, "Parameter must not be null"); } if (Debugging.AssertsEnabled) { Debugging.Assert(cqpC is QueryParser, "Parameter must be instance of QueryParser"); } QueryParser qp = (QueryParser)cqpC; return(qp.Parse(query)); }
public override Query GetQuery(String query, ICommonQueryParserConfiguration cqpC) { if (Debugging.AssertsEnabled) { Debugging.Assert(cqpC != null, () => "Parameter must not be null"); } if (Debugging.AssertsEnabled) { Debugging.Assert((cqpC is StandardQueryParser), () => "Parameter must be instance of StandardQueryParser"); } StandardQueryParser qp = (StandardQueryParser)cqpC; return(Parse(query, qp)); }
public override void SetDateResolution(ICommonQueryParserConfiguration cqpC, string field, DateTools.Resolution value) { Debug.Assert(cqpC is StandardQueryParser); StandardQueryParser qp = (StandardQueryParser)cqpC; qp.DateResolutionMap.Put(field, value); }
public override void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value) { throw new NotSupportedException(); }
public override void SetAnalyzeRangeTerms(ICommonQueryParserConfiguration cqpC, bool value) { Debug.Assert(cqpC is QueryParser); QueryParser qp = (QueryParser)cqpC; qp.AnalyzeRangeTerms = (value); }
public abstract void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value);
public override void SetDefaultOperatorAND(ICommonQueryParserConfiguration cqpC) { Debug.Assert(cqpC is QueryParser); QueryParser qp = (QueryParser)cqpC; qp.DefaultOperator = QueryParserBase.Operator.AND; }
public override void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value) { throw new NotSupportedException(); }
public abstract void SetAnalyzeRangeTerms(ICommonQueryParserConfiguration cqpC, bool value);
public override void SetAnalyzeRangeTerms(ICommonQueryParserConfiguration cqpC, bool value) { throw new NotSupportedException(); }
public override void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value) { throw UnsupportedOperationException.Create(); }
public abstract void SetDateResolution(ICommonQueryParserConfiguration cqpC, string field, DateTools.Resolution value);
public abstract Query GetQuery(string query, ICommonQueryParserConfiguration cqpC);
public void AssertQueryEquals(ICommonQueryParserConfiguration cqpC, string field, string query, string result) { Query q = GetQuery(query, cqpC); string s = q.ToString(field); if (!s.Equals(result)) { fail("Query /" + query + "/ yielded /" + s + "/, expecting /" + result + "/"); } }
public override void SetDefaultOperatorAND(ICommonQueryParserConfiguration cqpC) { Debug.Assert(cqpC is StandardQueryParser); StandardQueryParser qp = (StandardQueryParser)cqpC; qp.DefaultOperator = (Operator.AND); }
public override void SetAnalyzeRangeTerms(ICommonQueryParserConfiguration cqpC, bool value) { throw UnsupportedOperationException.Create(); }
public override void SetAutoGeneratePhraseQueries(ICommonQueryParserConfiguration cqpC, bool value) { Debug.Assert(cqpC is QueryParser); QueryParser qp = (QueryParser)cqpC; qp.AutoGeneratePhraseQueries = value; }
public override void SetDateResolution(ICommonQueryParserConfiguration cqpC, string field, DateTools.Resolution value) { Debug.Assert(cqpC is QueryParser); QueryParser qp = (QueryParser)cqpC; qp.SetDateResolution(field, value); }
public override void SetAnalyzeRangeTerms(ICommonQueryParserConfiguration cqpC, bool value) { throw new NotSupportedException(); }
public abstract void SetDefaultOperatorAND(ICommonQueryParserConfiguration cqpC);