kotman12 commented on code in PR #4053: URL: https://github.com/apache/solr/pull/4053#discussion_r2699812724
########## solr/core/src/java/org/apache/solr/handler/export/DoubleFieldWriter.java: ########## @@ -34,7 +34,7 @@ public DoubleFieldWriter( } @Override - public boolean write( + public int write( Review Comment: I cover this a little in the second paragraph of `#Solution`. To elaborate, I introduced `StoredFieldsWriter` which is a special type of `FieldWriter` that writes _many_ fields. I did this because it was the easiest way I saw to hook into the output of a `StoredFieldVisitor `, which writes multiple fields. Up until this point `FieldWriter` would only write one field at a time. It would return a boolean representing whether it successfully wrote the field. If the boolean was true an internal loop would increment the `fieldIndex` which then ... did absolutely nothing. So not entirely clear what the purpose is of keeping track of how many fields were written. But in order to maintain this potentially useful (although **not** currently useful) feature, I decided to expand the API to return an int which returns how many fields a particular `FieldWriter` wrote so we can increment by an arbitrary amount to support the new `StoredFieldsWriter `. I would be equally happy to just make `Fiel dWriter::write` be void instead of tracking this unused index. I also realize you may have missed `StoredFieldsWriter` because I put the class **inside** the `ExportWriter`. I think I am going to put it in a standalone file like the other `FieldWriter`s so it is more consistent and clear. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
