Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Search Pipelines] Add request-scoped state shared between processors #9405

Merged
merged 10 commits into from
Dec 5, 2023

Commits on Dec 5, 2023

  1. [Search Pipelines] Add request-scoped state shared between processors

    To handle cases where multiple search pipeline processors need to share
    information, we will allocate a Map<String, Object> for the lifetime of
    the request and pass it to each processor to get/set values.
    
    Signed-off-by: Michael Froh <froh@amazon.com>
    msfroh committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    634b6cc View commit details
    Browse the repository at this point in the history
  2. More work on stateful pipeline processors

    Added "context_prefix" convention to scope variables to avoid
    collisions.
    
    Let script processor have access to the request context.
    
    Added more unit tests.
    
    Signed-off-by: Michael Froh <froh@amazon.com>
    msfroh committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    5073026 View commit details
    Browse the repository at this point in the history
  3. Clean up and test CollapseResponseProcessor

    After realizing that we just need to keep the first hit for each group
    (since results are already sorted by the sort criteria), I think
    CollapseResponseProcessor might be worth including.
    
    Combining it with the oversample + truncate processors, it can provide a
    workaround for the lack of support for collapse + rescore.
    
    Signed-off-by: Michael Froh <froh@amazon.com>
    msfroh committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    c4c5352 View commit details
    Browse the repository at this point in the history
  4. Add changelog entry

    Signed-off-by: Michael Froh <froh@amazon.com>
    msfroh committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    f627c68 View commit details
    Browse the repository at this point in the history
  5. Suggested changes from @noCharger

    Signed-off-by: Michael Froh <froh@amazon.com>
    msfroh committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    c0637dc View commit details
    Browse the repository at this point in the history
  6. Add missing Javadoc and extra InternalSearchResponse case

    Signed-off-by: Michael Froh <froh@amazon.com>
    msfroh committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    dc22f61 View commit details
    Browse the repository at this point in the history
  7. Incorporate feedback from @navneet1v

    * Use default size in OversampleRequestProcessor if not specified.
    * Pass context to SearchPhaseResultsProcessor too.
    * Wrap context in its own class, in case we decide to add other fields
      to it in future.
    
    Signed-off-by: Michael Froh <froh@amazon.com>
    msfroh committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    7faddc5 View commit details
    Browse the repository at this point in the history
  8. Encapsulate map in PipelinedRequestContext

    Signed-off-by: Michael Froh <froh@amazon.com>
    msfroh committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    545cc0a View commit details
    Browse the repository at this point in the history
  9. Rename PipelineRequestContext -> PipelineProcessingContext

    Signed-off-by: Michael Froh <froh@amazon.com>
    msfroh committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    a7427f9 View commit details
    Browse the repository at this point in the history
  10. Move BasicMap and SearchRequestMap to parent package

    Signed-off-by: Michael Froh <froh@amazon.com>
    msfroh committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    9ce4ca8 View commit details
    Browse the repository at this point in the history