NightOwl888 commented on issue #763:
URL: https://github.com/apache/lucenenet/issues/763#issuecomment-1323440052

   > > I am not sure I totally understand the difference between **OPTION-A** 
and **OPTION-B**. Partial classes are a compiler feature that makes it easier 
to organize code, but at the end of the day they get compiled into 1 class. 
Both partial classes have access to all of the private state of the class.
   > 
   > **OPTION-A** is something that the team does not have to get involved with 
directly, it can be a 3rd party contribution that lives elsewhere, the team 
COULD open up a few things to make it a bit easier to copy and extend the 
Directory and Input/Output classes, e.g. exposing internally used helper 
methods if that turns out to be helpful as one go deeper.
   > 
   > But I think the confusion here is how far up the stack this goes, I am 
only focusing on the replication scenarios and similar scenarios that works on 
that level. As I said and tried to re-iterate is that I don't think we can get 
all the way up to `IndexWriter.UpdateDocumentAsync(...)` without problems - 
This also sets the two options very much apart because if we were even to 
Attempt to go that far, that had to be done within the Lucene Source (I think I 
can state that with a 100% certainty, if not then a 99.9999% certainty), where 
for replication purposes etc. We don't need to go that far up the stack, and 
because of that, this can be done as a custom implementation.
   > 
   > A SUPER DIRTY POC of **OPTION-A** can be seen here: 
https://github.com/jeme/LuceneAsyncInputsPoc/tree/main/src/LuceneAsyncInputsPoc/LuceneAsyncInputsPoc/CustomDirectory
   
   Gotcha.
   
   I don't think there is such an issue if we limit the scope like this. In 
fact, when upgrading the replicator tests, I left some [`LUCENENET TODO`s about 
making it 
async](https://github.com/apache/lucenenet/blob/4e49612d6867194440694b77db95fd0ed756c9a9/src/Lucene.Net.Tests.Replicator/Http/ReplicationServlet.cs#L86)
 so it fits together with ASP.NET Core better.
   
    Making stuff public that never was meant to be is probably not a good idea, 
so it would be preferable to fix this using partial classes (**OPTION-B**). But 
I agree that trying to fix `IndexWriter.UpdateDocument()` is probably not worth 
the effort.


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to