Ejemplo n.º 1
0
 public ValueSourceScorerAnonymousInnerClassHelper4(FunctionValues outerInstance, IndexReader reader,
                                                    FunctionValues @this, float l, float u)
     : base(reader, @this)
 {
     this.outerInstance = outerInstance;
     this.l             = l;
     this.u             = u;
 }
Ejemplo n.º 2
0
 protected internal ValueSourceScorer(IndexReader reader, FunctionValues values)
     : base(null)
 {
     this.m_reader = reader;
     this.m_maxDoc = reader.MaxDoc;
     this.m_values = values;
     SetCheckDeletes(true);
     this.liveDocs = MultiFields.GetLiveDocs(reader);
 }
Ejemplo n.º 3
0
 public CustomScorer(BoostedQuery outerInstance, AtomicReaderContext readerContext, BoostedQuery.BoostedWeight w, float qWeight, Scorer scorer, ValueSource vs)
     : base(w)
 {
     this.outerInstance = outerInstance;
     this.weight        = w;
     this.qWeight       = qWeight;
     this.scorer        = scorer;
     this.readerContext = readerContext;
     this.vals          = vs.GetValues(weight.fcontext, readerContext);
 }
Ejemplo n.º 4
0
 /// <exception cref="IOException"/>
 public AllScorer(FunctionQuery outerInstance, AtomicReaderContext context, IBits acceptDocs, FunctionWeight w, float qWeight)
     : base(w)
 {
     this.outerInstance = outerInstance;
     this.weight        = w;
     this.qWeight       = qWeight;
     this.reader        = context.Reader;
     this.maxDoc        = reader.MaxDoc;
     this.acceptDocs    = acceptDocs;
     vals = outerInstance.func.GetValues(weight.m_context, context);
 }
Ejemplo n.º 5
0
            public override Explanation Explain(AtomicReaderContext readerContext, int doc)
            {
                Explanation subQueryExpl = qWeight.Explain(readerContext, doc);

                if (!subQueryExpl.IsMatch)
                {
                    return(subQueryExpl);
                }
                FunctionValues vals = outerInstance.boostVal.GetValues(fcontext, readerContext);
                float          sc   = subQueryExpl.Value * vals.SingleVal(doc);
                Explanation    res  = new ComplexExplanation(true, sc, outerInstance.ToString() + ", product of:");

                res.AddDetail(subQueryExpl);
                res.AddDetail(vals.Explain(doc));
                return(res);
            }
Ejemplo n.º 6
0
 public ValueFillerAnonymousInnerClassHelper(FunctionValues outerInstance)
 {
     this.outerInstance = outerInstance;
     mval = new MutableValueSingle();
 }
Ejemplo n.º 7
0
 public override FieldComparer SetNextReader(AtomicReaderContext context)
 {
     docVals = outerInstance.GetValues(fcontext, context);
     return(this);
 }
Ejemplo n.º 8
0
 public AnonymousValueSourceScorer(IndexReader reader, FunctionValues functionValues, Func <int, bool> matchesValue)
     : base(reader, functionValues)
 {
     this.matchesValue = matchesValue ?? throw new ArgumentNullException(nameof(matchesValue));
 }