Search in sources :

Example 11 with VisibleForTesting

use of org.neo4j.util.VisibleForTesting in project neo4j by neo4j.

the class DocValuesCollector method getMatchingDocs.

/**
 * @return the documents matched by the query, one {@link MatchingDocs} per visited segment that contains a hit.
 */
@VisibleForTesting
List<MatchingDocs> getMatchingDocs() {
    if (docs != null && segmentHits > 0) {
        try {
            createMatchingDocs();
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        } finally {
            docs = null;
            scores = null;
            context = null;
        }
    }
    return matchingDocs;
}
Also used : UncheckedIOException(java.io.UncheckedIOException) IOException(java.io.IOException) UncheckedIOException(java.io.UncheckedIOException) VisibleForTesting(org.neo4j.util.VisibleForTesting)

Aggregations

VisibleForTesting (org.neo4j.util.VisibleForTesting)11 Config (org.neo4j.configuration.Config)3 PageCursor (org.neo4j.io.pagecache.PageCursor)3 SchemaDescriptor (org.neo4j.internal.schema.SchemaDescriptor)2 IOException (java.io.IOException)1 PrintWriter (java.io.PrintWriter)1 UncheckedIOException (java.io.UncheckedIOException)1 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 LongStream (java.util.stream.LongStream)1 Stream (java.util.stream.Stream)1 IntObjectProcedure (org.eclipse.collections.api.block.procedure.primitive.IntObjectProcedure)1 IntObjectMap (org.eclipse.collections.api.map.primitive.IntObjectMap)1 KernelException (org.neo4j.exceptions.KernelException)1 IndexConfig (org.neo4j.internal.batchimport.IndexConfig)1 Pair (org.neo4j.internal.helpers.collection.Pair)1 DuplicateSchemaRuleException (org.neo4j.internal.kernel.api.exceptions.schema.DuplicateSchemaRuleException)1 MalformedSchemaRuleException (org.neo4j.internal.kernel.api.exceptions.schema.MalformedSchemaRuleException)1