torstenkuhnhenne opened a new pull request, #16890: URL: https://github.com/apache/lucene/pull/16890
FilterFieldsProducer#terms(String) checked whether the requested field belongs to the filtered set with List#contains. Since the terms writer calls terms(field) once per field of a postings format group, every merge did a number of string comparisons quadratic in the number of fields. On indexes with many (e.g. dynamic) fields this check dominated merge CPU time. Keep the list for iterator() and size() so the field order is unchanged, and add a HashSet for the membership check, as FilterFieldInfos has done since LUCENE-8558. Closes #16874 ### Description <!-- If this is your first contribution to Lucene, please make sure you have reviewed the contribution guide. https://github.com/apache/lucene/blob/main/CONTRIBUTING.md --> -- 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]
