Exemplo n.º 1
0
            public override NumericDocValues GetNumeric(FieldInfo field)
            {
                Debug.Assert(field.DocValuesType == DocValuesType.NUMERIC || field.NormType == DocValuesType.NUMERIC);
                NumericDocValues values = @in.GetNumeric(field);

                Debug.Assert(values != null);
                return(new AssertingNumericDocValues(values, maxDoc));
            }
Exemplo n.º 2
0
        internal NumericDocValues GetNormValues(FieldInfo fi)
        {
            if (Debugging.AssertsEnabled)
            {
                Debugging.Assert(normsProducer != null);
            }

            IDictionary <string, object> normFields = normsLocal.Value;

            if (!normFields.TryGetValue(fi.Name, out object ret) || !(ret is NumericDocValues norms))
            {
                norms = normsProducer.GetNumeric(fi);
                normFields[fi.Name] = norms;
            }

            return(norms);
        }
Exemplo n.º 3
0
        internal NumericDocValues GetNormValues(FieldInfo fi)
        {
            Debug.Assert(normsProducer != null);

            IDictionary <string, object> normFields = normsLocal.Get();

            object ret;

            normFields.TryGetValue(fi.Name, out ret);
            var norms = ret as NumericDocValues;

            if (norms == null)
            {
                norms = normsProducer.GetNumeric(fi);
                normFields[fi.Name] = norms;
            }

            return(norms);
        }