Example #1
0
            private float[] vScores;             // reused in score() to avoid allocating this array for each doc

            // constructor
            internal CustomScorer(CustomScoreQuery enclosingInstance, Similarity similarity, IndexReader reader, CustomWeight w, Scorer subQueryScorer, Scorer[] valSrcScorers) : base(similarity)
            {
                InitBlock(enclosingInstance);
                this.weight         = w;
                this.qWeight        = w.GetValue();
                this.subQueryScorer = subQueryScorer;
                this.valSrcScorers  = valSrcScorers;
                this.reader         = reader;
                this.vScores        = new float[valSrcScorers.Length];
            }
Example #2
0
            private readonly float[] vScores; // reused in score() to avoid allocating this array for each doc

            // constructor
            internal CustomScorer(CustomScoreProvider provider, CustomWeight w,
                                  float qWeight, Scorer subQueryScorer, Scorer[] valSrcScorers)
                : base(w)
            {
                this.qWeight        = qWeight;
                this.subQueryScorer = subQueryScorer;
                this.valSrcScorers  = valSrcScorers;
                this.vScores        = new float[valSrcScorers.Length];
                this.provider       = provider;
            }
Example #3
0
			private float[] vScores; // reused in score() to avoid allocating this array for each doc 
			
			// constructor
			internal CustomScorer(CustomScoreQuery enclosingInstance, Similarity similarity, IndexReader reader, CustomWeight w, Scorer subQueryScorer, Scorer[] valSrcScorers):base(similarity)
			{
				InitBlock(enclosingInstance);
				this.weight = w;
				this.qWeight = w.GetValue();
				this.subQueryScorer = subQueryScorer;
				this.valSrcScorers = valSrcScorers;
				this.reader = reader;
				this.vScores = new float[valSrcScorers.Length];
                this.provider = this.Enclosing_Instance.GetCustomScoreProvider(reader);
			}
Example #4
0
            private readonly float[] vScores; // reused in score() to avoid allocating this array for each doc

            // constructor
            internal CustomScorer(CustomScoreQuery outerInstance, CustomScoreProvider provider, CustomWeight w,
                float qWeight, Scorer subQueryScorer, Scorer[] valSrcScorers)
                : base(w)
            {
                this.outerInstance = outerInstance;
                this.qWeight = qWeight;
                this.subQueryScorer = subQueryScorer;
                this.valSrcScorers = valSrcScorers;
                this.vScores = new float[valSrcScorers.Length];
                this.provider = provider;
            }
Example #5
0
            private float[] vScores;             // reused in score() to avoid allocating this array for each doc

            // constructor
            internal CustomScorer(CustomScoreQuery enclosingInstance, Similarity similarity, IndexReader reader, CustomWeight w, Scorer subQueryScorer, Scorer[] valSrcScorers) : base(similarity)
            {
                InitBlock(enclosingInstance);
                this.qWeight        = w.Value;
                this.subQueryScorer = subQueryScorer;
                this.valSrcScorers  = valSrcScorers;
                //this.reader = reader;
                this.vScores  = new float[valSrcScorers.Length];
                this.provider = this.Enclosing_Instance.GetCustomScoreProvider(reader);
            }