private static void InitializeKeys(SpatialIndexKey from, SpatialIndexKey to)
 {
     from.initialize(long.MinValue);
     to.initialize(long.MaxValue);
     from.InitValueAsLowest(ValueGroup.GEOMETRY);
     to.InitValueAsHighest(ValueGroup.GEOMETRY);
 }
Esempio n. 2
0
        public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, NodePropertyAccessor propertyAccessor, bool needsValues)
        {
            // This is basically a version of the basic implementation, but with added consulting of the PropertyAccessor
            // since these are lossy spatial values.
            SpatialIndexKey lowest = layout.newKey();

            lowest.initialize(long.MinValue);
            lowest.initValuesAsLowest();
            SpatialIndexKey highest = layout.newKey();

            highest.initialize(long.MaxValue);
            highest.initValuesAsHighest();
            try
            {
                RawCursor <Hit <SpatialIndexKey, VALUE>, IOException> seeker = tree.seek(lowest, highest);
                IComparer <SpatialIndexKey> comparator = new PropertyLookupFallbackComparator <SpatialIndexKey>(layout, propertyAccessor, descriptor.schema().PropertyId);
                NativeDistinctValuesProgressor <SpatialIndexKey, VALUE> progressor = new NativeDistinctValuesProgressorAnonymousInnerClass(this, seeker, client, openSeekers, layout, comparator, propertyAccessor);
                client.Initialize(descriptor, progressor, new IndexQuery[0], IndexOrder.NONE, false);
            }
            catch (IOException e)
            {
                throw new UncheckedIOException(e);
            }
        }
Esempio n. 3
0
 private void InitializeKeys(SpatialIndexKey treeKeyFrom, SpatialIndexKey treeKeyTo)
 {
     treeKeyFrom.initialize(long.MinValue);
     treeKeyTo.initialize(long.MaxValue);
 }