示例#1
0
        //private readonly Weight weight; // LUCENENET: Never read

        internal BooleanScorer(BooleanWeight weight, bool disableCoord, int minNrShouldMatch, IList <BulkScorer> optionalScorers, IList <BulkScorer> prohibitedScorers, int maxCoord)
        {
            this.minNrShouldMatch = minNrShouldMatch;
            //this.weight = weight; // LUCENENET: Never read

            foreach (BulkScorer scorer in optionalScorers)
            {
                scorers = new SubScorer(scorer, false, false, bucketTable.NewCollector(0), scorers);
            }

            foreach (BulkScorer scorer in prohibitedScorers)
            {
                scorers = new SubScorer(scorer, false, true, bucketTable.NewCollector(PROHIBITED_MASK), scorers);
            }

            coordFactors = new float[optionalScorers.Count + 1];
            for (int i = 0; i < coordFactors.Length; i++)
            {
                coordFactors[i] = disableCoord ? 1.0f : weight.Coord(i, maxCoord);
            }
        }
示例#2
0
        public BooleanScorer(BooleanWeight weight, bool disableCoord, int minNrShouldMatch, IList <BulkScorer> optionalScorers, IList <BulkScorer> prohibitedScorers, int maxCoord)
        {
            this.MinNrShouldMatch = minNrShouldMatch;
            this.Weight           = weight;

            foreach (BulkScorer scorer in optionalScorers)
            {
                Scorers = new SubScorer(scorer, false, false, bucketTable.NewCollector(0), Scorers);
            }

            foreach (BulkScorer scorer in prohibitedScorers)
            {
                Scorers = new SubScorer(scorer, false, true, bucketTable.NewCollector(PROHIBITED_MASK), Scorers);
            }

            CoordFactors = new float[optionalScorers.Count + 1];
            for (int i = 0; i < CoordFactors.Length; i++)
            {
                CoordFactors[i] = disableCoord ? 1.0f : weight.Coord(i, maxCoord);
            }
        }
示例#3
0
        public BooleanScorer(BooleanWeight weight, bool disableCoord, int minNrShouldMatch, IList<BulkScorer> optionalScorers, IList<BulkScorer> prohibitedScorers, int maxCoord)
        {
            this.MinNrShouldMatch = minNrShouldMatch;
            this.Weight = weight;

            foreach (BulkScorer scorer in optionalScorers)
            {
                Scorers = new SubScorer(scorer, false, false, bucketTable.NewCollector(0), Scorers);
            }

            foreach (BulkScorer scorer in prohibitedScorers)
            {
                Scorers = new SubScorer(scorer, false, true, bucketTable.NewCollector(PROHIBITED_MASK), Scorers);
            }

            CoordFactors = new float[optionalScorers.Count + 1];
            for (int i = 0; i < CoordFactors.Length; i++)
            {
                CoordFactors[i] = disableCoord ? 1.0f : weight.Coord(i, maxCoord);
            }
        }