You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2025/06/19 22:30:00 UTC

[jira] [Commented] (SOLR-17775) Optimize ValueSourceAugmenter -- fl function query

    [ https://issues.apache.org/jira/browse/SOLR-17775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17983753#comment-17983753 ] 

ASF subversion and git services commented on SOLR-17775:
--------------------------------------------------------

Commit e160aeb65d8fb4a9a50d82a089dfd5e25673a939 in solr's branch refs/heads/main from David Smiley
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=e160aeb65d8 ]

SOLR-17775: avoid over-calling ReaderUtil.subIndex (#3386)



> Optimize ValueSourceAugmenter -- fl function query
> --------------------------------------------------
>
>                 Key: SOLR-17775
>                 URL: https://issues.apache.org/jira/browse/SOLR-17775
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: Yura
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 9.9
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> h3. Problem
> ValueSourceAugmenter currently calculates function values on-demand during transform(), performing expensive binary searches and reader lookups for each document individually.
> h3. Solution
> Pre-calculate function values for all result set documents during setContext() by:
>  * Collecting and sorting document IDs from DocList
>  * Sequential iteration through sorted documents to calculate values once per reader segment
>  * Storing results in hash map for O(1) lookup during transform()
>  * Fallback to on-demand calculation for documents outside the pre-calculated set (RTG cases)
> h3. Performance Benefit
> Replaces repeated "find document at position N" operations (binary search per document) with efficient "get next document" iteration (sequential processing within reader segments), significantly reducing lookup overhead.
> h3. Compatibility
> Maintains full backward compatibility through fallback mechanism for edge cases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org