Exemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: IndexReference createIndexReference(IndexIdentifier identifier) throws java.io.IOException, org.neo4j.internal.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException
        internal override IndexReference CreateIndexReference(IndexIdentifier identifier)
        {
            IndexReader   reader        = DirectoryReader.open(GetIndexDirectory(identifier));
            IndexSearcher indexSearcher = NewIndexSearcher(identifier, reader);

            return(new ReadOnlyIndexReference(identifier, indexSearcher));
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: org.apache.lucene.search.IndexSearcher newIndexSearcher(IndexIdentifier identifier, org.apache.lucene.index.IndexReader reader) throws org.neo4j.internal.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException
        internal virtual IndexSearcher NewIndexSearcher(IndexIdentifier identifier, IndexReader reader)
        {
            IndexSearcher searcher = new IndexSearcher(reader);
            IndexType     type     = GetType(identifier);

            if (type.Similarity != null)
            {
                searcher.Similarity = type.Similarity;
            }
            return(searcher);
        }