public PayloadTermQuery(Term term, PayloadFunction function, bool includeSpanScore) : base(term) { this.Function = function; this.IncludeSpanScore = includeSpanScore; }
public PayloadNearQuery(SpanQuery[] clauses, int slop, bool inOrder, PayloadFunction function) : base(clauses, slop, inOrder) { m_fieldName = clauses[0].Field; // all clauses must have same field this.m_function = function; }
public PayloadTermQuery(Term term, PayloadFunction function) : this(term, function, true) { }
private PayloadNearQuery NewPhraseQuery(string fieldName, string phrase, bool inOrder, PayloadFunction function) { var words = _whiteSpaceRegex.Split(phrase); var clauses = new SpanQuery[words.Length]; for (var i = 0; i < clauses.Length; i++) { clauses[i] = new SpanTermQuery(new Term(fieldName, words[i])); } return new PayloadNearQuery(clauses, 0, inOrder, function); }
private PayloadNearQuery NewPhraseQuery(string fieldName, string phrase, bool inOrder, PayloadFunction function) { var words = _whiteSpaceRegex.Split(phrase); var clauses = new SpanQuery[words.Length]; for (var i = 0; i < clauses.Length; i++) { clauses[i] = new SpanTermQuery(new Term(fieldName, words[i])); } return(new PayloadNearQuery(clauses, 0, inOrder, function)); }
public PayloadNearQuery(SpanQuery[] clauses, int slop, bool inOrder, PayloadFunction function) : base(clauses, slop, inOrder) { fieldName = clauses[0].GetField(); // all clauses must have same field this.function = function; }
/// <summary> /// macro for payloadtermquery </summary> private SpanQuery Pt(string s, PayloadFunction fn, bool includeSpanScore) { return new PayloadTermQuery(new Term(FIELD, s), fn, includeSpanScore); }
public PayloadTermQuery(Term term, PayloadFunction function, bool includeSpanScore) : base(term) { this.function = function; this.includeSpanScore = includeSpanScore; }
private PayloadNearQuery NewPhraseQuery(string fieldName, string phrase, bool inOrder, PayloadFunction function) { string[] words = phrase.Split("[\\s]+".ToCharArray()); SpanQuery[] clauses = new SpanQuery[words.Length]; for (int i = 0; i < clauses.Length; i++) { clauses[i] = new SpanTermQuery(new Term(fieldName, words[i])); } return new PayloadNearQuery(clauses, 0, inOrder, function); }
/// <summary> /// macro for payloadtermquery </summary> private SpanQuery Pt(string s, PayloadFunction fn, bool includeSpanScore) { return(new PayloadTermQuery(new Term(FIELD, s), fn, includeSpanScore)); }
private PayloadNearQuery NewPhraseQuery(string fieldName, string phrase, bool inOrder, PayloadFunction function) { string[] words = phrase.Split("[\\s]+".ToCharArray()); SpanQuery[] clauses = new SpanQuery[words.Length]; for (int i = 0; i < clauses.Length; i++) { clauses[i] = new SpanTermQuery(new Term(fieldName, words[i])); } return(new PayloadNearQuery(clauses, 0, inOrder, function)); }