コード例 #1
0
        public void Test1TwoNegativeValues()
        {
            TermLongList list = new TermLongList();
            list.Add(null);
            list.Add("-1");
            list.Add("-2");
            list.Add("0");
            list.Add("1");

            list.Seal();
            Assert.True(Arrays.Equals(new long[] { 0, -2, -1, 0, 1 }, list.Elements));
        }
コード例 #2
0
 public DefaultLongFacetIterator(TermLongList valList, BigSegmentedArray countarray, int countlength, bool zeroBased)
 {
     _valList = valList;
     _countlength = countlength;
     _count = countarray;
     _countLengthMinusOne = _countlength - 1;
     _index = -1;
     if (!zeroBased)
         _index++;
     _facet = TermLongList.VALUE_MISSING;
     count = 0;
 }
コード例 #3
0
        public void Test3ThreeNegativeValuesWithoutDummy()
        {
            TermLongList list = new TermLongList();

            list.Add("-1");
            list.Add("-2");
            list.Add("-3");
            list.Add("0");
            list.Add("1");

            list.Seal();
            Assert.True(Arrays.Equals(new long[] { -3, -2, -1, 0, 1 }, list.Elements));
        }
コード例 #4
0
        public void Test1TwoNegativeValues()
        {
            TermLongList list = new TermLongList();

            list.Add(null);
            list.Add("-1");
            list.Add("-2");
            list.Add("0");
            list.Add("1");

            list.Seal();
            Assert.True(Arrays.Equals(new long[] { 0, -2, -1, 0, 1 }, list.Elements));
        }
コード例 #5
0
        public void Test3ThreeNegativeValuesWithoutDummy()
        {
            TermLongList list = new TermLongList();

            list.Add("-1");
            list.Add("-2");
            list.Add("-3");
            list.Add("0");
            list.Add("1");

            list.Seal();
            Assert.True(Arrays.Equals(new long[] { -3, -2, -1, 0, 1 }, list.Elements));
        }
コード例 #6
0
 public RecencyBoostScorer(RecencyBoostScorerBuilder parent, Scorer innerScorer, BigSegmentedArray orderArray, TermLongList termList)
     : base(innerScorer.Similarity)
 {
     _parent = parent;
     _innerScorer = innerScorer;
     _orderArray = orderArray;
     _termList = termList;
 }