コード例 #1
0
ファイル: SorterTestBase.cs プロジェクト: zhuthree/lucenenet
        public virtual void TestBinaryDocValuesField()
        {
            BinaryDocValues dv    = reader.GetBinaryDocValues(BINARY_DV_FIELD);
            BytesRef        bytes = new BytesRef();

            for (int i = 0; i < reader.MaxDoc; i++)
            {
                dv.Get(i, bytes);
                assertEquals("incorrect binary DocValues for doc " + i, sortedValues[i].ToString(), bytes.Utf8ToString());
            }
        }
コード例 #2
0
 private void assertOrdinalsExist(string field, IndexReader ir)
 {
     foreach (AtomicReaderContext context in ir.Leaves)
     {
         AtomicReader r = context.AtomicReader;
         if (r.GetBinaryDocValues(field) != null)
         {
             return; // not all segments must have this DocValues
         }
     }
     fail("no ordinals found for " + field);
 }