Class LongValuesSource.ConstantLongValuesSource

    • Field Detail

      • value

        private final long value
    • Constructor Detail

      • ConstantLongValuesSource

        private ConstantLongValuesSource​(long value)
    • Method Detail

      • isCacheable

        public boolean isCacheable​(LeafReaderContext ctx)
        Returns:
        true if the object can be cached against a given leaf
      • rewrite

        public LongValuesSource rewrite​(IndexSearcher searcher)
                                 throws java.io.IOException
        Description copied from class: LongValuesSource
        Return a LongValuesSource specialised for the given IndexSearcher

        Implementations should assume that this will only be called once. IndexSearcher-independent implementations can just return this

        Specified by:
        rewrite in class LongValuesSource
        Throws:
        java.io.IOException
      • getValue

        public long getValue()
        Get the constant value.