Example #1
0
#pragma warning disable IDE0060 // Remove unused parameter
            protected internal PayloadNearSpanScorer(PayloadNearQuery outerInstance, Spans spans, Weight weight, Similarity similarity, Similarity.SimScorer docScorer)
#pragma warning restore IDE0060 // Remove unused parameter
                : base(spans, weight, docScorer)
            {
                this.outerInstance = outerInstance;
                this.spans         = spans;
            }
Example #2
0
        public override object Clone()
        {
            int sz = m_clauses.Count;

            SpanQuery[] newClauses = new SpanQuery[sz];

            for (int i = 0; i < sz; i++)
            {
                newClauses[i] = (SpanQuery)m_clauses[i].Clone();
            }
            PayloadNearQuery boostingNearQuery = new PayloadNearQuery(newClauses, m_slop, m_inOrder, m_function);

            boostingNearQuery.Boost = Boost;
            return(boostingNearQuery);
        }
Example #3
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (!base.Equals(obj))
            {
                return(false);
            }
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }
            PayloadNearQuery other = (PayloadNearQuery)obj;

            if (m_fieldName == null)
            {
                if (other.m_fieldName != null)
                {
                    return(false);
                }
            }
            else if (!m_fieldName.Equals(other.m_fieldName, StringComparison.Ordinal))
            {
                return(false);
            }
            if (m_function == null)
            {
                if (other.m_function != null)
                {
                    return(false);
                }
            }
            else if (!m_function.Equals(other.m_function))
            {
                return(false);
            }
            return(true);
        }
Example #4
0
 public PayloadNearSpanWeight(PayloadNearQuery outerInstance, SpanQuery query, IndexSearcher searcher)
     : base(query, searcher)
 {
     this.outerInstance = outerInstance;
 }
Example #5
0
 protected internal PayloadNearSpanScorer(PayloadNearQuery outerInstance, Spans spans, Weight weight, Similarity similarity, Similarity.SimScorer docScorer)
     : base(spans, weight, docScorer)
 {
     this.outerInstance = outerInstance;
     this.spans         = spans;
 }