Exemple #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.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);
            }
			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);
			}