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

Pipeline specified in a search request (ad hoc execution). #6717

Closed
Tracked by #6278
macohen opened this issue Mar 16, 2023 · 1 comment
Closed
Tracked by #6278

Pipeline specified in a search request (ad hoc execution). #6717

macohen opened this issue Mar 16, 2023 · 1 comment
Assignees
Labels
Search Search query, autocomplete ...etc v2.8.0 'Issues and PRs related to version v2.8.0'

Comments

@macohen
Copy link
Contributor

macohen commented Mar 16, 2023

As a user of search pipelines I want to define a search pipeline on the fly in QueryDSL search request

@macohen macohen added the Search Search query, autocomplete ...etc label Mar 16, 2023
@macohen macohen removed the untriaged label Mar 16, 2023
@msfroh
Copy link
Collaborator

msfroh commented Apr 11, 2023

Copy/pasting the relevant snippet from the RFC:

// Specify an ad hoc search pipeline as part of a search request.
POST /my-index/_search

{
  "query" : {
    "match" : {
      "text_field" : "some search text"
    }
  },
  "pipeline" : {
    "request_processors" : [
      {
        "external_synonyms" : {
          "service_url" : "https://my-synonym-service/"
        }
      },
      {
        "ml_ranker_bracket" : {
          "result_oversampling" : 2, // Request 2 * size results
          "model_id" : "doc-features-20230109",
          "id" : "ml_ranker_identifier"
        }
      }
    ],
    "response_processors" : [
      {
        "result_blocker" : {
          "service_url" : "https://result-blocklist-service/"
        },
        "ml_ranker_bracket" : {
          // Placed here to indicate that it should run after result_blocker.
          // If not part of response_processors, it will run before result_blocker.
          "id" : "ml_ranker_identifier" 
        }
      }
    ]
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Search Search query, autocomplete ...etc v2.8.0 'Issues and PRs related to version v2.8.0'
Projects
Status: Done
Development

No branches or pull requests

2 participants