public IWeightedTermConstructionFlow GenerationTerm(GenerationType generationType, ICollection <string> terms) { var operand = SearchConditionNodeFactory.CreateGenerationTerm(rootOperator, generationType, terms); weightedOperands.Add(operand, null); return(this); }
IProximityOperandsConstructionFlow IProximityOperandsConstructionFlow.NearSimpleTerm(string term) { var operand = SearchConditionNodeFactory.CreateSimpleTerm(rootOperator, term); operands.Add(operand); return(this); }
public IWeightedTermConstructionFlow SimpleTerm(string term) { var operand = SearchConditionNodeFactory.CreateSimpleTerm(rootOperator, term); weightedOperands.Add(operand, null); return(this); }
IProximityOperandsConstructionFlow IProximityOperandsConstructionFlow.NearPrefixTerm(string prefix) { var operand = SearchConditionNodeFactory.CreatePrefixTerm(rootOperator, prefix); operands.Add(operand); return(this); }
public IWeightedTermConstructionFlow PrefixTerm(string prefix) { var operand = SearchConditionNodeFactory.CreatePrefixTerm(rootOperator, prefix); weightedOperands.Add(operand, null); return(this); }
/// <inheritdoc/> public IComplexTerm ComplexTerm(Func <ConditionEndpoint, IOperand> complexTermConstructor) { ArgumentValidator.EnsureArgumentNotNull(complexTermConstructor, "complexTermConstructor"); var endpoint = SearchConditionNodeFactory.CreateConditonRoot(); return(SearchConditionNodeFactory.CreateComplexTerm(this, complexTermConstructor.Invoke(endpoint))); }
public IWeightedTermConstructionFlow GenerationTerm(GenerationType generationType, ICollection <string> terms, float weight) { EnsureWeightIsCorrect(weight); var operand = SearchConditionNodeFactory.CreateGenerationTerm(rootOperator, generationType, terms); weightedOperands.Add(operand, weight); return(this); }
public IWeightedTermConstructionFlow ProximityTerm(Func <ProximityOperandEndpoint, IProximityOperandsConstructionFlow> proximityComposer) { var constructionFlow = proximityComposer.Invoke(new ProximityOperandEndpoint()); var operand = SearchConditionNodeFactory.CreateGenericProximityTerm(rootOperator, constructionFlow.Operands); weightedOperands.Add(operand, null); return(this); }
public IWeightedTermConstructionFlow PrefixTerm(string prefix, float weight) { EnsureWeightIsCorrect(weight); var operand = SearchConditionNodeFactory.CreatePrefixTerm(rootOperator, prefix); weightedOperands.Add(operand, weight); return(this); }
public IWeightedTermConstructionFlow SimpleTerm(string term, float weight) { EnsureWeightIsCorrect(weight); var operand = SearchConditionNodeFactory.CreateSimpleTerm(rootOperator, term); weightedOperands.Add(operand, weight); return(this); }
/// <inheritdoc/> public IProximityTerm GenericProximityTerm(Func <ProximityOperandEndpoint, IProximityOperandsConstructionFlow> proximityTermsConstructor) { ArgumentValidator.EnsureArgumentNotNull(proximityTermsConstructor, "proximityTermsConstructor"); var proximityOperandRoot = new ProximityOperandEndpoint(); var constructionFlow = proximityTermsConstructor.Invoke(proximityOperandRoot); return(SearchConditionNodeFactory.CreateGenericProximityTerm(this, constructionFlow.Operands)); }
/// <inheritdoc/> public ICustomProximityTerm CustomProximityTerm(Func <ProximityOperandEndpoint, IProximityOperandsConstructionFlow> proximityTermsConstructor, long maximumDistance, bool matchOrder) { ArgumentValidator.EnsureArgumentNotNull(proximityTermsConstructor, "proximityTermsConstructor"); var proximityOperandRoot = new ProximityOperandEndpoint(); var constructionFlow = proximityTermsConstructor.Invoke(proximityOperandRoot); return(SearchConditionNodeFactory.CreateCustomProximityTerm(this, constructionFlow.Operands, maximumDistance, matchOrder)); }
/// <inheritdoc/> public IWeightedTerm WeightedTerm(Func <WeightedTermEndpoint, IWeightedTermConstructionFlow> weightedTermsConstructor) { ArgumentValidator.EnsureArgumentNotNull(weightedTermsConstructor, "weightedTermsConstructor"); var endpoint = new WeightedTermEndpoint(); var constructionFlow = weightedTermsConstructor.Invoke(endpoint); return(SearchConditionNodeFactory.CreateWeightedTerm(this, constructionFlow.WeightedOperands)); }
internal ProximityOperandEndpoint() { rootOperator = SearchConditionNodeFactory.CreateConditonRoot(); operands = new List <IProximityOperand>(); }
/// <inheritdoc/> public IProximityOperand PrefixTerm(string prefix) { return(SearchConditionNodeFactory.CreatePrefixTerm(this, prefix)); }
/// <inheritdoc/> public IGenerationTerm GenerationTerm(GenerationType generationType, ICollection <string> terms) { return(SearchConditionNodeFactory.CreateGenerationTerm(this, generationType, terms)); }
/// <inheritdoc/> public IOperator AndNot() { return(SearchConditionNodeFactory.CreateAndNot(this)); }
/// <inheritdoc/> public IOperator Or() { return(SearchConditionNodeFactory.CreateOr(this)); }
/// <inheritdoc/> public IProximityOperand SimpleTerm(string term) { return(SearchConditionNodeFactory.CreateSimpleTerm(this, term)); }
internal WeightedTermEndpoint() { rootOperator = SearchConditionNodeFactory.CreateConditonRoot(); weightedOperands = new Dictionary <IWeighableTerm, float?>(); }