Skip to content

Conversation

@GabeFernandez310
Copy link

@GabeFernandez310 GabeFernandez310 commented Nov 10, 2022

Description

Adds simplequerystring as alternate syntax for the simple_query_string function which currently exists in the SQL plugin.

Issues Resolved

AOS-765

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • 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: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
@codecov
Copy link

codecov bot commented Nov 10, 2022

Codecov Report

❗ No coverage uploaded for pull request base (integ-add-legacy-syntax-for-simple_query_string-function@03f30e3). Click here to learn what that means.
The diff coverage is n/a.

@@                                     Coverage Diff                                     @@
##             integ-add-legacy-syntax-for-simple_query_string-function     #162   +/-   ##
===========================================================================================
  Coverage                                                            ?   95.71%           
  Complexity                                                          ?     3351           
===========================================================================================
  Files                                                               ?      337           
  Lines                                                               ?     9117           
  Branches                                                            ?      672           
===========================================================================================
  Hits                                                                ?     8726           
  Misses                                                              ?      334           
  Partials                                                            ?       57           
Flag Coverage Δ
query-workbench 62.76% <0.00%> (?)
sql-engine 98.27% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@GabeFernandez310 GabeFernandez310 changed the title Dev add legacy syntax for simple query string function Add SimpleQueryString As Alternate Syntax For Simple_Query_String Nov 10, 2022
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
multiFieldRelevanceFunctionName
: MULTI_MATCH
| SIMPLE_QUERY_STRING
| SIMPLEQUERYSTRING

Choose a reason for hiding this comment

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

Legacy engine never had such syntax (with square brackets []): func(['field']...)

Choose a reason for hiding this comment

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

This is correct. For whatever reason, it doesn't appear at that simplequerystring was included.

We should just close this PR without merging... I don't think it's needed.

``simplequerystring([field_expression+], query_expression[, option=<option_value>]*)``

The simplequerystring function maps to the simple_query_string query used in search engine, to return the documents that match a provided text, number, date or boolean value with a given field or fields. This is an alternate syntax for `simple_query_string`_
The **^** lets you *boost* certain fields. Boosts are multipliers that weigh matches in one field more heavily than matches in other fields. The syntax allows to specify the fields in double quotes, single quotes, in backtick or even without any wrap. All fields search using star ``"*"`` is also available (star symbol should be wrapped). The weight is optional and should be specified using after the field name, it could be delimeted by the `caret` character or by whitespace. Please, refer to examples below:

Choose a reason for hiding this comment

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

whitspace?


``simplequerystring([field_expression+], query_expression[, option=<option_value>]*)``

The simplequerystring function maps to the simple_query_string query used in search engine, to return the documents that match a provided text, number, date or boolean value with a given field or fields. This is an alternate syntax for `simple_query_string`_

Choose a reason for hiding this comment

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

please mention that this is added for backwards compatibility

multiFieldRelevanceFunctionName
: MULTI_MATCH
| SIMPLE_QUERY_STRING
| SIMPLEQUERYSTRING

Choose a reason for hiding this comment

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

This is correct. For whatever reason, it doesn't appear at that simplequerystring was included.

We should just close this PR without merging... I don't think it's needed.

@GabeFernandez310 GabeFernandez310 deleted the dev-add-legacy-syntax-for-simple_query_string-function branch December 1, 2022 05:36
andy-k-improving pushed a commit that referenced this pull request Nov 16, 2024
* Add geojson support for XYPoint

Signed-off-by: Heemin Kim <heemin@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants