What/Why
What are you proposing?
Initial work on Flow Framework has focused on provisioning. This proposal is intended to highlight at a very high level what needs to happen as we transition toward handling search and ingest capabilities.
Please consider this as a pre-RFC request for community input well before any designs are proposed in a more fully fleshed-out RFC.
What users have asked for this feature?
Early discussions with users have indicated a strong desire not to change existing search queries. They are often part of existing production use or CI pipelines that are heavily tested, and even minor changes to existing queries would create churn in documentation, training, and updating tests.
What problems are you trying to solve?
Broadly speaking the Flow Framework RFC envisioned both a search orchestration capability and integration with search pipelines.
Those plans outlined in the RFC remain unchanged: we still plan to process content contained in use case templates to send configurations to existing OpenSearch and Plugin APIs. What is changing is how we expect users to search using that functionality.
Initial thoughts and commentary tended more toward orchestration as a result of @navneet1v 's comment here which would have led to an API somewhat like
POST /_plugins/flowframework/_search?pipeline=my_pipeline
{
// payload with keys required by the pipeline which are configured by builder of the pipeline.
}
However, conversations with @dylan-tong-aws have indicated customers have already adopted the functionality of search pipelines (hat tip to @msfroh) and they continue to evolve with some additional capability being added, and are very reluctant to change from this model:
POST /my-index/_search?pipeline=my_pipeline
{
"query" : {
"match" : {
"text_field" : "search text"
}
}
}
Accordingly, we propose to still perform much of the same integration planned in the RFC, but minimizing/eliminating API changes from current widespread usage.
What is the developer experience going to be?
Currently, Search Pipelines supports three types of processors:
- Pre-Processors which turn a
SearchRequest into a different SearchRequest - Post-Processors which turn a
SearchResponse into a different SearchResponse - Search phase results processors which act between the Query and Fetch phases
We plan to add additional Processors of any of the above types when they are appropriate to that portion of the search workflow and would correspond to individual workflow steps. For example, a data transformation step prior to search could be in a pre-processor and would configure a search pipeline appropriately.
In addition, we propose to add a fourth Processor type which takes a SearchRequest and returns a SearchResponse.
This processor type would serve as a front-end to a workflow process executing more complex search workflows using Flow Framework.
Note that use of this new processor type would introduce expectations of latency in search workflows; however, when used they would trade a slower response with more flexible search options.
Are there any security considerations?
Some search processors access external APIs which may require access keys and/or other credentials. These need to be handled with as fine-grained control as is possible.
Are there any breaking changes to the API
The entire purpose of this proposal is to prevent breaking changes to existing search processor API calls.
What is the user experience going to be?
Users who are not taking advantage of these workflow-based processors will see no change.
Users who take advantage of these workflows will be able to configure their pipelines and have them automatically applied to specific types of search requests to give them more power in shaping their results.
Are there breaking changes to the User Experience?
The entire purpose of this proposal is to prevent changes to existing user experience.
Why should it be built? Any reason not to?
To bring the power of flow framework to existing search behavior with minimum changes.
What will it take to execute?
- We need to conduct a proof-of-concept to show that we can execute a flow framework workflow behind a
Processor interface. - We need to establish safeguards to prevent any increase in latency to any existing non-flow-framework requests.
- We need to create a new
Processor type. - We need to understand and work within existing search query constraints.
- We need to understand specific customer use cases and design (generally) to support them
- We need to ensure appropriate workflow step types are implemented in appropriate plugins, but supported via client calls (e.g., ML-related processors should be developed in ML-commons, but the configuration of those processors needs to be in flow framework)
- We need to integrate the configuration steps logically and simply with the Flow Framework front end.
Any remaining open questions?
- Many Search Pipeline applications are tightly integrated with corresponding Ingest Pipeline applications. These need to be well-understood and supported.
- One specific application we need to consider is processing of large document, including chunking input (with overlap for context) and combining search results from multiple processes. This particular use case may span across multiple processor types that all need to be integrated with each other.
- Many more open questions that you are welcome to add in the comments below.
What/Why
What are you proposing?
Initial work on Flow Framework has focused on provisioning. This proposal is intended to highlight at a very high level what needs to happen as we transition toward handling search and ingest capabilities.
Please consider this as a pre-RFC request for community input well before any designs are proposed in a more fully fleshed-out RFC.
What users have asked for this feature?
Early discussions with users have indicated a strong desire not to change existing search queries. They are often part of existing production use or CI pipelines that are heavily tested, and even minor changes to existing queries would create churn in documentation, training, and updating tests.
What problems are you trying to solve?
Broadly speaking the Flow Framework RFC envisioned both a search orchestration capability and integration with search pipelines.
Those plans outlined in the RFC remain unchanged: we still plan to process content contained in use case templates to send configurations to existing OpenSearch and Plugin APIs. What is changing is how we expect users to search using that functionality.
Initial thoughts and commentary tended more toward orchestration as a result of @navneet1v 's comment here which would have led to an API somewhat like
However, conversations with @dylan-tong-aws have indicated customers have already adopted the functionality of search pipelines (hat tip to @msfroh) and they continue to evolve with some additional capability being added, and are very reluctant to change from this model:
Accordingly, we propose to still perform much of the same integration planned in the RFC, but minimizing/eliminating API changes from current widespread usage.
What is the developer experience going to be?
Currently, Search Pipelines supports three types of processors:
SearchRequestinto a differentSearchRequestSearchResponseinto a differentSearchResponseWe plan to add additional
Processors of any of the above types when they are appropriate to that portion of the search workflow and would correspond to individual workflow steps. For example, a data transformation step prior to search could be in a pre-processor and would configure a search pipeline appropriately.In addition, we propose to add a fourth
Processortype which takes aSearchRequestand returns aSearchResponse.This processor type would serve as a front-end to a workflow process executing more complex search workflows using Flow Framework.
Note that use of this new processor type would introduce expectations of latency in search workflows; however, when used they would trade a slower response with more flexible search options.
Are there any security considerations?
Some search processors access external APIs which may require access keys and/or other credentials. These need to be handled with as fine-grained control as is possible.
Are there any breaking changes to the API
The entire purpose of this proposal is to prevent breaking changes to existing search processor API calls.
What is the user experience going to be?
Users who are not taking advantage of these workflow-based processors will see no change.
Users who take advantage of these workflows will be able to configure their pipelines and have them automatically applied to specific types of search requests to give them more power in shaping their results.
Are there breaking changes to the User Experience?
The entire purpose of this proposal is to prevent changes to existing user experience.
Why should it be built? Any reason not to?
To bring the power of flow framework to existing search behavior with minimum changes.
What will it take to execute?
Processorinterface.Processortype.Any remaining open questions?