Skip to content

Conversation

@vamsimanohar
Copy link
Member

@vamsimanohar vamsimanohar commented Aug 11, 2025

Description

This PR is the first step in making it easier to search in PPL. We want to support a simple "free text search" like the one described in this issue

The goal is to let you write a simple search like this:
search source = my_index "fatal error"

And our system will automatically translate it to this behind the scenes:
search source = my_index | where simple_query_string("fatal error")

Changes in this PR

To prepare for the new free text search, I'm updating how a few of our search functions work.

Now, you won't always have to provide a list of fields to search in. The fields parameter is now optional for functions like simple_query_string and multi_match.

If you don't specify any fields, the query will automatically search the default fields set up for that index (specifically, in the index.query.default_field setting).

Updated Documentation can be found here: PPL Relevance Functions

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@vamsimanohar vamsimanohar changed the title Intermediate commit for search_text Make fields optional parameter in multi field relevance function. Aug 11, 2025
@vamsimanohar vamsimanohar self-assigned this Aug 12, 2025
@vamsimanohar vamsimanohar force-pushed the search_text branch 2 times, most recently from 98c52fa to 64b982b Compare August 12, 2025 01:12
@vamsimanohar vamsimanohar marked this pull request as ready for review August 12, 2025 02:32
Copy link
Collaborator

@Swiddis Swiddis left a comment

Choose a reason for hiding this comment

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

Please add some docs (comments or otherwise) to explain how this works. I'm able to follow individual methods and I think I see an entrypoint, but I don't see how everything is linking together.

penghuo
penghuo previously approved these changes Aug 19, 2025
Copy link
Collaborator

@penghuo penghuo left a comment

Choose a reason for hiding this comment

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

@songkant-aws Please take a look.

@vamsimanohar
Copy link
Member Author

The integ test failure is unrelated to this PR

@Swiddis Swiddis self-requested a review August 20, 2025 21:12
@vamsimanohar vamsimanohar merged commit 5c0ed0d into opensearch-project:main Aug 21, 2025
23 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 21, 2025
Signed-off-by: Vamsi Manohar <[email protected]>
(cherry picked from commit 5c0ed0d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
vamsimanohar added a commit that referenced this pull request Aug 21, 2025
…evance function. (#4093)

* Make fields parameter optional in multi field relevance queries (#4018)

Signed-off-by: Vamsi Manohar <[email protected]>
(cherry picked from commit 5c0ed0d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fixed text block syntax issue for Java 11

Signed-off-by: Vamsi Manohar <[email protected]>

---------

Signed-off-by: Vamsi Manohar <[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>
Co-authored-by: Vamsi Manohar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.19-dev enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants