javanna commented on PR #15125: URL: https://github.com/apache/lucene/pull/15125#issuecomment-3227621741
Thanks for the answers @dnhatn they are very clear and make sense to me. Maybe the only doubt I have left is whether checking for field info null as opposed to writer makes more sense long term. I am worried that things may change where the initialization of the two happens differently. > Yes, I did consider that. I also explored the option of removing PerField that doesn't have fieldInfos after hitting an exception. However, both could be expensive and significantly slow down, especially when documents contain many fields. Would delaying adding `PerField` to the array be more expensive? Do you have an instinct of the problems it may cause? That feels like a more long term solution to me, but I may miss implications of it. I don't mean to be a pain, the fix is good, I am good with merging it as-is. We could potentially improve on it but I don't have strong opinions on it. I would love to play with the idea of delaying adding the instance to the array further but I don't have time at the moment, sadly. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org