//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void verify(org.neo4j.storageengine.api.NodePropertyAccessor accessor, int[] propKeyIds, java.util.List<org.neo4j.values.storable.Value[]> updatedValueTuples) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException, java.io.IOException public override void Verify(NodePropertyAccessor accessor, int[] propKeyIds, IList <Value[]> updatedValueTuples) { try { DuplicateCheckingCollector collector = DuplicateCheckingCollector.ForProperties(accessor, propKeyIds); foreach (Value[] valueTuple in updatedValueTuples) { collector.Init(); Query query = LuceneDocumentStructure.newSeekQuery(valueTuple); IndexSearcher().search(query, collector); } } catch (IOException e) { Exception cause = e.InnerException; if (cause is IndexEntryConflictException) { throw ( IndexEntryConflictException )cause; } throw e; } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void verify(org.neo4j.storageengine.api.NodePropertyAccessor accessor, int[] propKeyIds) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException, java.io.IOException public override void Verify(NodePropertyAccessor accessor, int[] propKeyIds) { try { DuplicateCheckingCollector collector = DuplicateCheckingCollector.ForProperties(accessor, propKeyIds); IndexSearcher searcher = IndexSearcher(); foreach (LeafReaderContext leafReaderContext in searcher.IndexReader.leaves()) { Fields fields = leafReaderContext.reader().fields(); foreach (string field in fields) { if (LuceneDocumentStructure.useFieldForUniquenessVerification(field)) { TermsEnum terms = LuceneDocumentStructure.originalTerms(fields.terms(field), field); BytesRef termsRef; while ((termsRef = terms.next()) != null) { if (terms.docFreq() > 1) { collector.Init(terms.docFreq()); searcher.search(new TermQuery(new Term(field, termsRef)), collector); } } } } } } catch (IOException e) { Exception cause = e.InnerException; if (cause is IndexEntryConflictException) { throw ( IndexEntryConflictException )cause; } throw e; } }
private DuplicateCheckingCollector GetDuplicateCollector(NodePropertyAccessor accessor, int[] propertyKeyIds) { return(DuplicateCheckingCollector.ForProperties(accessor, propertyKeyIds)); }