示例#1
0
        public override IBits GetDocsWithField(string field)
        {
            IBits     docsWithField = base.GetDocsWithField(field);
            FieldInfo fi            = base.FieldInfos.FieldInfo(field);

            if (docsWithField != null)
            {
                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(fi != null);
                }
                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(fi.HasDocValues);
                }
                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(MaxDoc == docsWithField.Length);
                }
                docsWithField = new AssertingBits(docsWithField);
            }
            else
            {
                if (Debugging.AssertsEnabled)
                {
                    Debugging.Assert(fi is null || fi.HasDocValues == false);
                }
            }
            return(docsWithField);
        }
示例#2
0
        public override Bits GetDocsWithField(string field)
        {
            Bits      docsWithField = base.GetDocsWithField(field);
            FieldInfo fi            = FieldInfos.FieldInfo(field);

            if (docsWithField != null)
            {
                Debug.Assert(fi != null);
                Debug.Assert(fi.HasDocValues());
                Debug.Assert(MaxDoc == docsWithField.Length());
                docsWithField = new AssertingBits(docsWithField);
            }
            else
            {
                Debug.Assert(fi == null || fi.HasDocValues() == false);
            }
            return(docsWithField);
        }