paulirwin commented on issue #921: URL: https://github.com/apache/lucenenet/issues/921#issuecomment-2572275370
I reviewed all use of ToString overrides, and determined that nothing needs to be done here. If anyone else disagrees or finds anything actionable, let me know. Below are the overrides that use raw booleans in the output string. In almost all cases, these simply seem to be for diagnostic/debugging output, and not for anything where the value is expected to be parsed or otherwise converted (in whole or in part) back to boolean values. "debug" below means that it is intended as debug output only. "not used" means it does not have any references to it in Lucene.NET code. Types that use bool values directly in `ToString()` output: - LimitTokenCountAnalyzer - debug, not used - MemoryPostingsFormat - debug, not used - ProximityQueryNode - debug; interface denotes it's "for printing", not used - RandomSimilarityProvider - debug, not used - DocumentsWriterPerThread - debug, not used - LiveIndexWriterConfig - debug, used by IndexWriterConfig, but that usage is only used in a test. Used by IndexWriter just to write to infoStream. - LogMergePolicy - debug, not used - ReadersAndUpdates - debug, not used - FieldValueFilter - debug, not used - (potentially?) SortField - if m_missingValue is a boolean - used in various places, but nothing seems to indicate it would be affected as where it is used is i.e. looking for specific values - IOContext - debug, not used - MergeInfo - debug, not used - AttributeImpl - debug, but also LUCENENET specific, so no Java compat concerns - AttributeSource via ReflectAsString - only used in tests, ToString not used. ToString is debug output, ReflectAsString generally seems to be debug output and not intended as a serious form of serialization (for example, some strings would cause unparseable output) Then, there are the Query overrides where it has a `string field` parameter, like the one that triggered the creation of this issue originally. I reviewed all usages of `Query.ToString(string field)` as well as `Query.ToString()` (which calls the former with `""` as the parameter), and these also are only used for debug output and in assertion messages. It does not seem like it is intended to generate a parseable query string, and if it were intended to do so it seems like there would be several issues with this in the derived classes, like not properly escaping string values. So I think these can be safely ignored. Query overrides of `ToString(string field)` containing booleans: - PayloadNearQuery - SpanNearQuery -- 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]
