Ejemplo n.º 1
0
 /// <summary>
 /// OBS this implementation can only provide values for properties of type <seealso cref="string"/>.
 /// Other property types will still be counted as distinct, but {@code client} won't receive <seealso cref="Value"/>
 /// instances for those. </summary>
 /// <param name="client"> <seealso cref="IndexProgressor.NodeValueClient"/> to get initialized with this progression. </param>
 /// <param name="propertyAccessor"> <seealso cref="NodePropertyAccessor"/> for reading property values. </param>
 /// <param name="needsValues"> whether or not to load string values. </param>
 public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, NodePropertyAccessor propertyAccessor, bool needsValues)
 {
     try
     {
         IndexQuery[]            noQueries       = new IndexQuery[0];
         BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(client, _descriptor.schema().PropertyIds);
         Fields fields = MultiFields.getFields(IndexSearcher.IndexReader);
         foreach (ValueEncoding valueEncoding in ValueEncoding.values())
         {
             Terms terms = fields.terms(valueEncoding.key());
             if (terms != null)
             {
                 System.Func <BytesRef, Value> valueMaterializer = valueEncoding == ValueEncoding.String && needsValues ? term => Values.stringValue(term.utf8ToString()) : term => null;
                 TermsEnum termsIterator = terms.GetEnumerator();
                 if (valueEncoding == ValueEncoding.Number)
                 {
                     termsIterator = NumericUtils.filterPrefixCodedLongs(termsIterator);
                 }
                 multiProgressor.Initialize(_descriptor, new LuceneDistinctValuesProgressor(termsIterator, client, valueMaterializer), noQueries, IndexOrder.NONE, needsValues);
             }
         }
         client.Initialize(_descriptor, multiProgressor, noQueries, IndexOrder.NONE, needsValues);
     }
     catch (IOException e)
     {
         throw new UncheckedIOException(e);
     }
 }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void nodeIndexSeekWithFreshIndexReader(DefaultNodeValueIndexCursor cursor, org.neo4j.storageengine.api.schema.IndexReader indexReader, org.neo4j.internal.kernel.api.IndexQuery.ExactPredicate... query) throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotApplicableKernelException
        public override void NodeIndexSeekWithFreshIndexReader(DefaultNodeValueIndexCursor cursor, IndexReader indexReader, params IndexQuery.ExactPredicate[] query)
        {
            cursor.Read = this;
            Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient target = InjectFullValuePrecision(cursor, query, indexReader);
            // we never need values for exact predicates
            indexReader.Query(target, IndexOrder.NONE, false, query);
        }
Ejemplo n.º 3
0
 private void StartSeekForRange(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, IndexQuery.GeometryRangePredicate rangePredicate, IndexQuery[] query)
 {
     try
     {
         BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(client, descriptor.schema().PropertyIds);
         client.Initialize(descriptor, multiProgressor, query, IndexOrder.NONE, false);
         SpaceFillingCurve curve = _spatial.SpaceFillingCurve;
         double[]          from  = rangePredicate.From() == null ? null : rangePredicate.From().coordinate();
         double[]          to    = rangePredicate.To() == null ? null : rangePredicate.To().coordinate();
         IList <SpaceFillingCurve.LongRange> ranges = curve.GetTilesIntersectingEnvelope(from, to, _configuration);
         foreach (SpaceFillingCurve.LongRange range in ranges)
         {
             SpatialIndexKey treeKeyFrom = layout.newKey();
             SpatialIndexKey treeKeyTo   = layout.newKey();
             InitializeKeys(treeKeyFrom, treeKeyTo);
             treeKeyFrom.FromDerivedValue(long.MinValue, range.Min);
             treeKeyTo.FromDerivedValue(long.MaxValue, range.Max + 1);
             RawCursor <Hit <SpatialIndexKey, VALUE>, IOException> seeker = makeIndexSeeker(treeKeyFrom, treeKeyTo, IndexOrder.NONE);
             IndexProgressor hitProgressor = new NativeHitIndexProgressor <>(seeker, client, openSeekers);
             multiProgressor.Initialize(descriptor, hitProgressor, query, IndexOrder.NONE, false);
         }
     }
     catch (System.ArgumentException)
     {
         // Invalid query ranges will cause this state (eg. min>max)
         client.Initialize(descriptor, IndexProgressor.EMPTY, query, IndexOrder.NONE, false);
     }
     catch (IOException e)
     {
         throw new UncheckedIOException(e);
     }
 }
Ejemplo n.º 4
0
        public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient cursor, NodePropertyAccessor propertyAccessor, bool needsValues)
        {
            BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(cursor, _descriptor.schema().PropertyIds);

            cursor.Initialize(_descriptor, multiProgressor, new IndexQuery[0], IndexOrder.NONE, needsValues);
            InstanceSelector.forAll(reader => reader.distinctValues(multiProgressor, propertyAccessor, needsValues));
        }
Ejemplo n.º 5
0
 public IndexProgressor_NodeValueClientAnonymousInnerClass(QueryResultComparingIndexReader outerInstance, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, IndexOrder indexOrder, bool needsValues, IndexQuery[] query, PrimitiveLongResourceIterator otherResult)
 {
     this.outerInstance = outerInstance;
     this._client       = client;
     this._indexOrder   = indexOrder;
     this._needsValues  = needsValues;
     this._query        = query;
     this._otherResult  = otherResult;
 }
Ejemplo n.º 6
0
        public override void Query(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient cursor, IndexOrder indexOrder, bool needsValues, params IndexQuery[] predicates)
        {
            // Spatial does not support providing values
            if (needsValues)
            {
                throw new System.InvalidOperationException("Spatial index does not support providing values");
            }

            if (predicates.Length != 1)
            {
                throw new System.ArgumentException("Only single property spatial indexes are supported.");
            }
            IndexQuery predicate = predicates[0];

            if (predicate is IndexQuery.ExistsPredicate)
            {
                LoadAll();
                BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(cursor, _descriptor.schema().PropertyIds);
                cursor.Initialize(_descriptor, multiProgressor, predicates, indexOrder, false);
                foreach (NativeIndexReader <SpatialIndexKey, NativeIndexValue> reader in this)
                {
                    reader.Query(multiProgressor, indexOrder, false, predicates);
                }
            }
            else
            {
                if (ValidPredicate(predicate))
                {
                    CoordinateReferenceSystem crs;
                    if (predicate is IndexQuery.ExactPredicate)
                    {
                        crs = (( PointValue )((IndexQuery.ExactPredicate)predicate).value()).CoordinateReferenceSystem;
                    }
                    else if (predicate is IndexQuery.GeometryRangePredicate)
                    {
                        crs = ((IndexQuery.GeometryRangePredicate)predicate).crs();
                    }
                    else
                    {
                        throw new System.ArgumentException("Wrong type of predicate, couldn't get CoordinateReferenceSystem");
                    }
                    SpatialIndexPartReader <NativeIndexValue> part = UncheckedSelect(crs);
                    if (part != null)
                    {
                        part.Query(cursor, indexOrder, false, predicates);
                    }
                    else
                    {
                        cursor.Initialize(_descriptor, IndexProgressor.EMPTY, predicates, indexOrder, false);
                    }
                }
                else
                {
                    cursor.Initialize(_descriptor, IndexProgressor.EMPTY, predicates, indexOrder, false);
                }
            }
        }
Ejemplo n.º 7
0
        public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient cursor, NodePropertyAccessor propertyAccessor, bool needsValues)
        {
            LoadAll();
            BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(cursor, _descriptor.schema().PropertyIds);

            cursor.Initialize(_descriptor, multiProgressor, new IndexQuery[0], IndexOrder.NONE, needsValues);
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: for (NativeIndexReader<?,NativeIndexValue> reader : this)
            foreach (NativeIndexReader <object, NativeIndexValue> reader in this)
            {
                reader.DistinctValues(multiProgressor, propertyAccessor, needsValues);
            }
        }
Ejemplo n.º 8
0
        public override void Query(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient cursor, IndexOrder indexOrder, bool needsValues, params IndexQuery[] predicates)
        {
            ValidateQuery(indexOrder, predicates);

            KEY treeKeyFrom = Layout.newKey();
            KEY treeKeyTo   = Layout.newKey();

            InitializeFromToKeys(treeKeyFrom, treeKeyTo);

            bool needFilter = InitializeRangeForQuery(treeKeyFrom, treeKeyTo, predicates);

            StartSeekForInitializedRange(cursor, treeKeyFrom, treeKeyTo, predicates, indexOrder, needFilter, needsValues);
        }
Ejemplo n.º 9
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public final void nodeIndexSeek(org.neo4j.internal.kernel.api.IndexReference index, org.neo4j.internal.kernel.api.NodeValueIndexCursor cursor, org.neo4j.internal.kernel.api.IndexOrder indexOrder, boolean needsValues, org.neo4j.internal.kernel.api.IndexQuery... query) throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotApplicableKernelException, org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException
        public override void NodeIndexSeek(IndexReference index, NodeValueIndexCursor cursor, IndexOrder indexOrder, bool needsValues, params IndexQuery[] query)
        {
            Ktx.assertOpen();
            if (HasForbiddenProperties(index))
            {
                cursor.Close();
                return;
            }

            DefaultNodeValueIndexCursor cursorImpl = ( DefaultNodeValueIndexCursor )cursor;
            IndexReader reader = IndexReader(index, false);

            cursorImpl.Read = this;
            Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient withFullPrecision = InjectFullValuePrecision(cursorImpl, query, reader);
            reader.Query(withFullPrecision, indexOrder, needsValues, query);
        }
Ejemplo n.º 10
0
        private Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient InjectFullValuePrecision(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient cursor, IndexQuery[] query, IndexReader reader)
        {
            Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient target = cursor;
            if (!reader.HasFullValuePrecision(query))
            {
                IndexQuery[] filters = new IndexQuery[query.Length];
                int          count   = 0;
                for (int i = 0; i < query.Length; i++)
                {
                    IndexQuery q = query[i];
                    switch (q.Type())
                    {
                    case range:
                        ValueGroup valueGroup = q.ValueGroup();
                        if ((valueGroup == NUMBER || valueGroup == GEOMETRY) && !reader.HasFullValuePrecision(q))
                        {
                            filters[i] = q;
                            count++;
                        }
                        break;

                    case exact:
                        Value value = ((IndexQuery.ExactPredicate)q).value();
                        if (value.ValueGroup() == ValueGroup.NUMBER || Values.isArrayValue(value) || value.ValueGroup() == ValueGroup.GEOMETRY)
                        {
                            if (!reader.HasFullValuePrecision(q))
                            {
                                filters[i] = q;
                                count++;
                            }
                        }
                        break;

                    default:
                        break;
                    }
                }
                if (count > 0)
                {
                    // filters[] can contain null elements. The non-null elements are the filters and each sit in the designated slot
                    // matching the values from the index.
                    target = new NodeValueClientFilter(target, _cursors.allocateNodeCursor(), _cursors.allocatePropertyCursor(), this, filters);
                }
            }
            return(target);
        }
Ejemplo n.º 11
0
 internal virtual void StartSeekForInitializedRange(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, KEY treeKeyFrom, KEY treeKeyTo, IndexQuery[] query, IndexOrder indexOrder, bool needFilter, bool needsValues)
 {
     if (IsEmptyRange(treeKeyFrom, treeKeyTo))
     {
         client.Initialize(Descriptor, IndexProgressor.EMPTY, query, indexOrder, needsValues);
         return;
     }
     try
     {
         RawCursor <Hit <KEY, VALUE>, IOException> seeker = MakeIndexSeeker(treeKeyFrom, treeKeyTo, indexOrder);
         IndexProgressor hitProgressor = GetIndexProgressor(seeker, client, needFilter, query);
         client.Initialize(Descriptor, hitProgressor, query, indexOrder, needsValues);
     }
     catch (IOException e)
     {
         throw new UncheckedIOException(e);
     }
 }
Ejemplo n.º 12
0
        public override void Query(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient cursor, IndexOrder indexOrder, bool needsValues, params IndexQuery[] predicates)
        {
            if (predicates.Length != 1)
            {
                throw new System.ArgumentException("Only single property temporal indexes are supported.");
            }
            IndexQuery predicate = predicates[0];

            if (predicate is IndexQuery.ExistsPredicate)
            {
                LoadAll();
                BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(cursor, _descriptor.schema().PropertyIds);
                cursor.Initialize(_descriptor, multiProgressor, predicates, indexOrder, needsValues);
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: for (NativeIndexReader<?,NativeIndexValue> reader : this)
                foreach (NativeIndexReader <object, NativeIndexValue> reader in this)
                {
                    reader.Query(multiProgressor, indexOrder, needsValues, predicates);
                }
            }
            else
            {
                if (ValidPredicate(predicate))
                {
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: NativeIndexReader<?,NativeIndexValue> part = uncheckedSelect(predicate.valueGroup());
                    NativeIndexReader <object, NativeIndexValue> part = UncheckedSelect(predicate.ValueGroup());
                    if (part != null)
                    {
                        part.Query(cursor, indexOrder, needsValues, predicates);
                    }
                    else
                    {
                        cursor.Initialize(_descriptor, IndexProgressor.EMPTY, predicates, indexOrder, needsValues);
                    }
                }
                else
                {
                    cursor.Initialize(_descriptor, IndexProgressor.EMPTY, predicates, indexOrder, needsValues);
                }
            }
        }
Ejemplo n.º 13
0
        public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, NodePropertyAccessor propertyAccessor, bool needsValues)
        {
            KEY lowest = Layout.newKey();

            lowest.initialize(long.MinValue);
            lowest.initValuesAsLowest();
            KEY highest = Layout.newKey();

            highest.initialize(long.MaxValue);
            highest.initValuesAsHighest();
            try
            {
                RawCursor <Hit <KEY, VALUE>, IOException> seeker = Tree.seek(lowest, highest);
                client.Initialize(Descriptor, new NativeDistinctValuesProgressor <>(seeker, client, OpenSeekers, Layout, Layout.compareValue), new IndexQuery[0], IndexOrder.NONE, needsValues);
            }
            catch (IOException e)
            {
                throw new UncheckedIOException(e);
            }
        }
Ejemplo n.º 14
0
        internal override void StartSeekForInitializedRange(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, SpatialIndexKey treeKeyFrom, SpatialIndexKey treeKeyTo, IndexQuery[] query, IndexOrder indexOrder, bool needFilter, bool needsValues)
        {
            // Spatial does not support providing values
            Debug.Assert(!needsValues);

            if (layout.compare(treeKeyFrom, treeKeyTo) > 0)
            {
                client.Initialize(descriptor, IndexProgressor.EMPTY, query, IndexOrder.NONE, false);
                return;
            }
            try
            {
                RawCursor <Hit <SpatialIndexKey, VALUE>, IOException> seeker = makeIndexSeeker(treeKeyFrom, treeKeyTo, indexOrder);
                IndexProgressor hitProgressor = new NativeHitIndexProgressor <>(seeker, client, openSeekers);
                client.Initialize(descriptor, hitProgressor, query, IndexOrder.NONE, false);
            }
            catch (IOException e)
            {
                throw new UncheckedIOException(e);
            }
        }
Ejemplo n.º 15
0
        public override void Query(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient cursor, IndexOrder indexOrder, bool needsValues, params IndexQuery[] predicates)
        {
            // Spatial does not support providing values
            if (needsValues)
            {
                throw new System.InvalidOperationException("Spatial index does not support providing values");
            }

            ValidateQuery(indexOrder, predicates);
            IndexQuery predicate = predicates[0];

            SpatialIndexKey treeKeyFrom = layout.newKey();
            SpatialIndexKey treeKeyTo   = layout.newKey();

            InitializeKeys(treeKeyFrom, treeKeyTo);

            switch (predicate.Type())
            {
            case exists:
                StartSeekForExists(treeKeyFrom, treeKeyTo, cursor, predicate);
                break;

            case exact:
                StartSeekForExact(treeKeyFrom, treeKeyTo, cursor, ((IndexQuery.ExactPredicate)predicate).value(), predicate);
                break;

            case range:
                IndexQuery.GeometryRangePredicate rangePredicate = (IndexQuery.GeometryRangePredicate)predicate;
                if (!rangePredicate.Crs().Equals(_spatial.crs))
                {
                    throw new System.ArgumentException("IndexQuery on spatial index with mismatching CoordinateReferenceSystem: " + rangePredicate.Crs() + " != " + _spatial.crs);
                }
                StartSeekForRange(cursor, rangePredicate, predicates);
                break;

            default:
                throw new System.ArgumentException("IndexQuery of type " + predicate.Type() + " is not supported.");
            }
        }
Ejemplo n.º 16
0
 public override void Query(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, IndexOrder indexOrder, bool needsValues, params IndexQuery[] query)
 {
     IndexQuery.GeometryRangePredicate geometryRangePredicate = GetGeometryRangePredicateIfAny(query);
     if (geometryRangePredicate != null)
     {
         ValidateQuery(indexOrder, query);
         try
         {
             // If there's a GeometryRangeQuery among the predicates then this query changes from a straight-forward: build from/to and seek...
             // into a query that is split into multiple sub-queries. Predicates both before and after will have to be accompanied each sub-query.
             BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(client, Descriptor.schema().PropertyIds);
             client.Initialize(Descriptor, multiProgressor, query, indexOrder, needsValues);
             double[] from = geometryRangePredicate.From() == null ? null : geometryRangePredicate.From().coordinate();
             double[] to   = geometryRangePredicate.To() == null ? null : geometryRangePredicate.To().coordinate();
             CoordinateReferenceSystem           crs    = geometryRangePredicate.Crs();
             SpaceFillingCurve                   curve  = _spaceFillingCurveSettings.forCrs(crs, false);
             IList <SpaceFillingCurve.LongRange> ranges = curve.GetTilesIntersectingEnvelope(from, to, _configuration);
             foreach (SpaceFillingCurve.LongRange range in ranges)
             {
                 // Here's a sub-query that we'll have to do for this geometry range. Build this query from all predicates
                 // and when getting to the geometry range predicate that sparked these sub-query chenanigans, swap in this sub-query in its place.
                 GenericKey treeKeyFrom = Layout.newKey();
                 GenericKey treeKeyTo   = Layout.newKey();
                 InitializeFromToKeys(treeKeyFrom, treeKeyTo);
                 bool needFiltering = InitializeRangeForGeometrySubQuery(treeKeyFrom, treeKeyTo, query, crs, range);
                 StartSeekForInitializedRange(multiProgressor, treeKeyFrom, treeKeyTo, query, indexOrder, needFiltering, needsValues);
             }
         }
         catch (System.ArgumentException)
         {
             // Invalid query ranges will cause this state (eg. min>max)
             client.Initialize(Descriptor, IndexProgressor.EMPTY, query, indexOrder, needsValues);
         }
     }
     else
     {
         base.Query(client, indexOrder, needsValues, query);
     }
 }
Ejemplo n.º 17
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void query(org.neo4j.storageengine.api.schema.IndexProgressor_NodeValueClient cursor, org.neo4j.internal.kernel.api.IndexOrder indexOrder, boolean needsValues, org.neo4j.internal.kernel.api.IndexQuery... predicates) throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotApplicableKernelException
        public override void Query(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient cursor, IndexOrder indexOrder, bool needsValues, params IndexQuery[] predicates)
        {
//JAVA TO C# CONVERTER TODO TASK: Method reference arbitrary object instance method syntax is not converted by Java to C# Converter:
            IndexSlot slot = SlotSelector.selectSlot(predicates, IndexQuery::valueGroup);

            if (slot != null)
            {
                InstanceSelector.select(slot).query(cursor, indexOrder, needsValues, predicates);
            }
            else
            {
                if (indexOrder != IndexOrder.NONE)
                {
                    throw new System.NotSupportedException(format("Tried to query index with unsupported order %s. Supported orders for query %s are %s.", indexOrder, Arrays.ToString(predicates), IndexOrder.NONE));
                }
                BridgingIndexProgressor multiProgressor = new BridgingIndexProgressor(cursor, _descriptor.schema().PropertyIds);
                cursor.Initialize(_descriptor, multiProgressor, predicates, indexOrder, needsValues);
                try
                {
                    InstanceSelector.forAll(reader =>
                    {
                        try
                        {
                            reader.query(multiProgressor, indexOrder, needsValues, predicates);
                        }
                        catch (IndexNotApplicableKernelException e)
                        {
                            throw new InnerException(e);
                        }
                    });
                }
                catch (InnerException e)
                {
                    throw e.InnerException;
                }
            }
        }
Ejemplo n.º 18
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);
            }
        }
Ejemplo n.º 19
0
 public override void DistinctValues(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, NodePropertyAccessor propertyAccessor, bool needsValues)
 {
     @delegate.DistinctValues(client, propertyAccessor, needsValues);
 }
Ejemplo n.º 20
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void query(org.neo4j.storageengine.api.schema.IndexProgressor_NodeValueClient client, org.neo4j.internal.kernel.api.IndexOrder indexOrder, boolean needsValues, org.neo4j.internal.kernel.api.IndexQuery... query) throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotApplicableKernelException
        public override void Query(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, IndexOrder indexOrder, bool needsValues, params IndexQuery[] query)
        {
            @delegate.Query(client, indexOrder, needsValues, query);
        }
Ejemplo n.º 21
0
 public NativeDistinctValuesProgressorAnonymousInnerClass(SpatialIndexPartReader <VALUE> outerInstance, RawCursor <Hit <SpatialIndexKey, VALUE>, IOException> seeker, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, UnknownType openSeekers, UnknownType layout, IComparer <SpatialIndexKey> comparator, NodePropertyAccessor propertyAccessor) : base(seeker, client, openSeekers, layout, comparator)
 {
     this.outerInstance     = outerInstance;
     this._propertyAccessor = propertyAccessor;
 }
Ejemplo n.º 22
0
 private void StartSeekForExists(SpatialIndexKey treeKeyFrom, SpatialIndexKey treeKeyTo, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, params IndexQuery[] predicates)
 {
     treeKeyFrom.InitValueAsLowest(ValueGroup.GEOMETRY);
     treeKeyTo.InitValueAsHighest(ValueGroup.GEOMETRY);
     StartSeekForInitializedRange(client, treeKeyFrom, treeKeyTo, predicates, IndexOrder.NONE, false, false);
 }
Ejemplo n.º 23
0
 public virtual IndexProgressor GetIndexProgressor(string field, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client)
 {
     return(new LongValuesIndexProgressor(GetMatchingDocs(), TotalHits, field, client));
 }
Ejemplo n.º 24
0
 internal NativeDistinctValuesProgressor(RawCursor <Hit <KEY, VALUE>, IOException> seeker, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, ICollection <RawCursor <Hit <KEY, VALUE>, IOException> > toRemoveFromOnClose, IndexLayout <KEY, VALUE> layout, IComparer <KEY> comparator) : base(seeker, client, toRemoveFromOnClose)
 {
     this._layout     = layout;
     _prev            = layout.newKey();
     this._comparator = comparator;
 }
Ejemplo n.º 25
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void query(org.neo4j.storageengine.api.schema.IndexProgressor_NodeValueClient client, org.neo4j.internal.kernel.api.IndexOrder indexOrder, boolean needsValues, org.neo4j.internal.kernel.api.IndexQuery... predicates) throws org.neo4j.internal.kernel.api.exceptions.schema.IndexNotApplicableKernelException
        public override void Query(Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, IndexOrder indexOrder, bool needsValues, params IndexQuery[] predicates)
        {
            Query query = ToLuceneQuery(predicates);

            client.Initialize(_descriptor, Search(query).getIndexProgressor(NODE_ID_KEY, client), predicates, indexOrder, needsValues);
        }
Ejemplo n.º 26
0
 private IndexProgressor GetIndexProgressor(RawCursor <Hit <KEY, VALUE>, IOException> seeker, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, bool needFilter, IndexQuery[] query)
 {
     return(needFilter ? new FilteringNativeHitIndexProgressor <>(seeker, client, OpenSeekers, query) : new NativeHitIndexProgressor <>(seeker, client, OpenSeekers));
 }
Ejemplo n.º 27
0
 internal NativeHitIndexProgressor(RawCursor <Hit <KEY, VALUE>, IOException> seeker, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, ICollection <RawCursor <Hit <KEY, VALUE>, IOException> > toRemoveFromOnClose) : base(seeker, client, toRemoveFromOnClose)
 {
 }
Ejemplo n.º 28
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: LuceneDistinctValuesProgressor(org.apache.lucene.index.TermsEnum terms, org.neo4j.storageengine.api.schema.IndexProgressor_NodeValueClient client, System.Func<org.apache.lucene.util.BytesRef,org.neo4j.values.storable.Value> valueMaterializer) throws java.io.IOException
        internal LuceneDistinctValuesProgressor(TermsEnum terms, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, System.Func <BytesRef, Value> valueMaterializer)
        {
            this._terms             = terms;
            this._client            = client;
            this._valueMaterializer = valueMaterializer;
        }
Ejemplo n.º 29
0
 private void StartSeekForExact(SpatialIndexKey treeKeyFrom, SpatialIndexKey treeKeyTo, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, Value value, params IndexQuery[] predicates)
 {
     treeKeyFrom.From(value);
     treeKeyTo.From(value);
     StartSeekForInitializedRange(client, treeKeyFrom, treeKeyTo, predicates, IndexOrder.NONE, false, false);
 }
Ejemplo n.º 30
0
 internal LongValuesIndexProgressor(IEnumerable <MatchingDocs> allMatchingDocs, int totalHits, string field, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client) : base(allMatchingDocs, totalHits, field)
 {
     this.Client = client;
 }