//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void insert(java.util.List<Object> data) throws java.io.IOException private void Insert(IList <object> data) { for (int i = 0; i < data.Count; i++) { Document doc = LuceneDocumentStructure.documentRepresentingProperties(i, Values.of(data[i])); _writer.addDocument(doc); } _searcherManager.maybeRefreshBlocking(); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void insert(java.util.Collection<org.neo4j.values.storable.Value> data) throws java.io.IOException private void Insert(ICollection <Value> data) { Value[] dataArray = data.toArray(new Value[data.Count]); for (int i = 0; i < dataArray.Length; i++) { Document doc = LuceneDocumentStructure.documentRepresentingProperties(i, dataArray[i]); _index.IndexWriter.addDocument(doc); } _index.maybeRefreshBlocking(); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private static void insertDocument(org.neo4j.kernel.api.impl.index.partition.WritableIndexPartition partition, long nodeId, Object propertyValue) throws java.io.IOException private static void InsertDocument(WritableIndexPartition partition, long nodeId, object propertyValue) { Document doc = LuceneDocumentStructure.documentRepresentingProperties(nodeId, Values.of(propertyValue)); partition.IndexWriter.addDocument(doc); }
public override void Process <T1>(IndexEntryUpdate <T1> update) { long nodeId = update.EntityId; try { switch (update.UpdateMode()) { case ADDED: Added(update); _writer.updateDocument(LuceneDocumentStructure.newTermForChangeOrRemove(nodeId), LuceneDocumentStructure.documentRepresentingProperties(nodeId, update.Values())); break; case CHANGED: Changed(update); _writer.updateDocument(LuceneDocumentStructure.newTermForChangeOrRemove(nodeId), LuceneDocumentStructure.documentRepresentingProperties(nodeId, update.Values())); break; case REMOVED: Removed(update); _writer.deleteDocuments(LuceneDocumentStructure.newTermForChangeOrRemove(nodeId)); break; default: throw new System.InvalidOperationException("Unknown update mode " + Arrays.ToString(update.Values())); } } catch (IOException e) { throw new UncheckedIOException(e); } }
private static Document UpdateAsDocument <T1>(IndexEntryUpdate <T1> update) { return(LuceneDocumentStructure.documentRepresentingProperties(update.EntityId, update.Values())); }
public static Document DocumentRepresentingProperties(long nodeId, params object[] objects) { return(LuceneDocumentStructure.documentRepresentingProperties(nodeId, Values.values(objects))); }