You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/03/12 18:29:43 UTC

[GitHub] [lucene-solr] s1monw opened a new pull request #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument

s1monw opened a new pull request #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument
URL: https://github.com/apache/lucene-solr/pull/1346
 
 
   Today we have a large amount of duplicated code that is rather of
   complex nature. This change consolidates the code-paths to always
   use the updateDocuments path.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] s1monw commented on issue #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument

Posted by GitBox <gi...@apache.org>.
s1monw commented on issue #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument
URL: https://github.com/apache/lucene-solr/pull/1346#issuecomment-598371903
 
 
   @uschindler I would love to get your input here too
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] dnhatn commented on a change in pull request #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument

Posted by GitBox <gi...@apache.org>.
dnhatn commented on a change in pull request #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument
URL: https://github.com/apache/lucene-solr/pull/1346#discussion_r392396808
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
 ##########
 @@ -1655,7 +1655,7 @@ private long updateDocument(final DocumentsWriterDeleteQueue.Node<?> delNode,
     ensureOpen();
     boolean success = false;
     try {
-      final long seqNo = maybeProcessEvents(docWriter.updateDocument(doc, analyzer, delNode));
+      final long seqNo = maybeProcessEvents(docWriter.updateDocuments(List.of(doc), analyzer, delNode));
 
 Review comment:
   Can we just delegate this method to `IndexWriter#updateDocuments`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] s1monw merged pull request #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument

Posted by GitBox <gi...@apache.org>.
s1monw merged pull request #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument
URL: https://github.com/apache/lucene-solr/pull/1346
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] s1monw commented on issue #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument

Posted by GitBox <gi...@apache.org>.
s1monw commented on issue #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument
URL: https://github.com/apache/lucene-solr/pull/1346#issuecomment-598351277
 
 
   @mikemccand @dnhatn wanna take a look

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] dnhatn commented on a change in pull request #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument

Posted by GitBox <gi...@apache.org>.
dnhatn commented on a change in pull request #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument
URL: https://github.com/apache/lucene-solr/pull/1346#discussion_r392011485
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java
 ##########
 @@ -346,7 +285,7 @@ public long updateDocuments(Iterable<? extends Iterable<? extends IndexableField
     }
   }
   
-  private long finishDocument(DocumentsWriterDeleteQueue.Node<?> deleteNode) {
+  private long finishDocument(DocumentsWriterDeleteQueue.Node<?> deleteNode, int docCount) {
 
 Review comment:
   Should we call this finishDocument**S** ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] dnhatn commented on a change in pull request #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument

Posted by GitBox <gi...@apache.org>.
dnhatn commented on a change in pull request #1346: LUCENE-9276: Use same code-path for updateDocuments and updateDocument
URL: https://github.com/apache/lucene-solr/pull/1346#discussion_r392011697
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/index/DocumentsWriter.java
 ##########
 @@ -474,49 +474,11 @@ long updateDocuments(final Iterable<? extends Iterable<? extends IndexableField>
     return seqNo;
   }
 
+
   long updateDocument(final Iterable<? extends IndexableField> doc, final Analyzer analyzer,
 
 Review comment:
   Can we also remove this method and delegate `updateDocument` to `updateDocuments` in IndexWriter instead?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org