internal MultiTermQueryRewrite(RewriteMultiTerm rewrite, int?size = null) { switch (rewrite) { case RewriteMultiTerm.ConstantScore: case RewriteMultiTerm.ScoringBoolean: case RewriteMultiTerm.ConstantScoreBoolean: _value = rewrite.ToEnumValue(); break; case RewriteMultiTerm.TopTermsN: case RewriteMultiTerm.TopTermsBoostN: case RewriteMultiTerm.TopTermsBlendedFreqsN: if (size == null) { throw new ArgumentException($"{nameof(size)} must be specified with {nameof(RewriteMultiTerm)}.{rewrite}"); } var rewriteType = rewrite.ToEnumValue(); rewriteType = rewriteType.Substring(0, rewriteType.Length - 1); _value = rewriteType + size; break; default: throw new ArgumentOutOfRangeException(nameof(rewrite)); } Rewrite = rewrite; Size = size; }
public MultiMatchQueryDescriptor <T> Rewrite(RewriteMultiTerm rewrite) { this._Rewrite = rewrite; return(this); }
public FuzzyDateQueryDescriptor <T> Rewrite(RewriteMultiTerm rewrite) { ((IFuzzyQuery)this).Rewrite = rewrite; return(this); }
public WildcardQueryDescriptor <T> Rewrite(RewriteMultiTerm rewrite) { ((IWildcardQuery)this).Rewrite = rewrite; return(this); }
public PrefixQueryDescriptor <T> Rewrite(RewriteMultiTerm rewrite) { ((IPrefixQuery)this).Rewrite = rewrite; return(this); }
public MatchQueryDescriptor <T> Rewrite(RewriteMultiTerm rewrite) { rewrite.ThrowIfNull("rewrite"); this._Rewrite = rewrite; return(this); }
public QueryStringQueryDescriptor <T> Rewrite(RewriteMultiTerm rewriteMultiTerm) { ((IQueryStringQuery)this).Rewrite = rewriteMultiTerm; return(this); }
public QueryStringDescriptor <T> Rewrite(RewriteMultiTerm rewriteMultiTerm) { this._Rewrite = rewriteMultiTerm; return(this); }
public MultiMatchQueryDescriptor <T> FuzzyRewrite(RewriteMultiTerm rewrite) => Assign(a => a.FuzzyRewrite = rewrite);
public MatchQueryDescriptor <T> Rewrite(RewriteMultiTerm rewrite) { ((IMatchQuery)this).Rewrite = rewrite; return(this); }
public FuzzyNumericQueryDescriptor<T> Rewrite(RewriteMultiTerm rewrite) { ((IFuzzyQuery)this).Rewrite = rewrite; return this; }