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

Add parameterized search #509

Merged
merged 24 commits into from
Dec 5, 2024
Merged

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Dec 4, 2024

Description

This PR greatly improves the search experience and flexibility in few different ways:

  1. Updates the EditQueryModal to dynamically display parameters/placeholders in a query that matches the pattern {{<placeholder>}}. Users can fill these out (either text or binary - binary accepts an image input and performs the conversion to binary automatically), and execute search directly within the modal, to quickly verify different queries with different parameters, before saving.
  2. Updates the Search tab in the Inspector to have similar functionality as ^; a default query will be provided, but users can override in this sandboxed env. They can search and view results all within this panel. Additionally, they can search with/without any configured search pipeline (no search pipeline allowed if in the context of ingest for simplicity).
  3. Adds a few header buttons on the search form, including 'Delete resources' to delete everything similar to ingest, and a 'Test pipeline' button, which will automatically open up the Inspector's Search tab to let users test.

Implementation details:

  • Adds reusable QueryParamsList used in both the modal and the Inspector to dynamically render a form list of parameters based on some source query.
  • Updates the EditQueryModal and Query (the search tab in Inspector) to leverage the QueryParamsList and maintain standalone request query state
  • utils / types / constants added to define and process query parameters
  • other: standardizes many of the modal widths to be larger to more easily display details without truncation (advanced transformation configurations, query configurations, etc.)
  • other: fixes overflow in the inspector panel for all tabs
  • other: removes 'Test query' button in the configure query form panel, since this can now be done via Inspector
  • other: adds empty state modal for ingest tab in Inspector
  • other: adds a check to block ingest until docs are populated

Demo video, showing the different states of the Search panel in the Inspector, in both the contexts of ingest and search. There is guardrails for running each (e.g., no "with pipeline" option if in the context of ingest, search disabled if empty parameters, etc.). Also shows the updated "Edit query configuration" panel, which has similar functionality as that of the Inspector panel.

screen-capture.13.webm

Issues Resolved

Closes #431

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
@ohltyler ohltyler marked this pull request as ready for review December 4, 2024 18:58
Signed-off-by: Tyler Ohlsen <[email protected]>
@ohltyler
Copy link
Member Author

ohltyler commented Dec 4, 2024

Corresponding integ test update: opensearch-project/opensearch-dashboards-functional-test#1664

Copy link
Collaborator

@saimedhi saimedhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ohltyler ohltyler merged commit ba2aff3 into opensearch-project:main Dec 5, 2024
6 of 7 checks passed
@ohltyler ohltyler deleted the new-search branch December 5, 2024 16:18
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 5, 2024
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit ba2aff3)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ohltyler pushed a commit that referenced this pull request Dec 5, 2024
(cherry picked from commit ba2aff3)

Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@saimedhi
Copy link
Collaborator

saimedhi commented Dec 5, 2024

Please take a look at this integ test PR Simplify api response info for FF tests few changes are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x feature A new feature for the plugin workflow editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve image search UX
2 participants