-
Notifications
You must be signed in to change notification settings - Fork 188
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
Fix .
, "
, and unicode characters search error in subfields in map score modifiers
#1008
Open
RaynorChavez
wants to merge
19
commits into
mainline
Choose a base branch
from
raynor/fix_period_mapscoremod
base: mainline
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+422
−8
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 16, 2024 03:36
— with
GitHub Actions
Inactive
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 16, 2024 03:37
— with
GitHub Actions
Inactive
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 16, 2024 03:37
— with
GitHub Actions
Failure
RaynorChavez
changed the title
Fix
Fix Oct 17, 2024
.
search error when subfields in map score modifiers contain .
.
and "
search error when subfields in map score modifiers contain .
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 01:50
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 01:50
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 01:51
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 02:03
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 02:03
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 02:04
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 02:19
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 02:19
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 02:20
— with
GitHub Actions
Error
RaynorChavez
changed the title
Fix
Fix Oct 17, 2024
.
and "
search error when subfields in map score modifiers contain .
.
, "
, and unicode characters search error when subfields in map score modifiers contain .
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 02:52
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 02:52
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 17, 2024 02:54
— with
GitHub Actions
Error
RaynorChavez
changed the title
Fix
Fix Oct 17, 2024
.
, "
, and unicode characters search error when subfields in map score modifiers contain .
.
, "
, and unicode characters search error in subfields in map score modifiers
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 17, 2024 03:27
— with
GitHub Actions
Inactive
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 17, 2024 03:27
— with
GitHub Actions
Inactive
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 17, 2024 03:29
— with
GitHub Actions
Inactive
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 21, 2024 00:53
— with
GitHub Actions
Inactive
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 21, 2024 00:54
— with
GitHub Actions
Failure
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 21, 2024 02:01
— with
GitHub Actions
Inactive
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 21, 2024 02:01
— with
GitHub Actions
Failure
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 21, 2024 02:01
— with
GitHub Actions
Error
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 21, 2024 02:02
— with
GitHub Actions
Inactive
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 21, 2024 02:47
— with
GitHub Actions
Inactive
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 21, 2024 02:47
— with
GitHub Actions
Inactive
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 21, 2024 02:47
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 21, 2024 02:48
— with
GitHub Actions
Error
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 21, 2024 03:46
— with
GitHub Actions
Inactive
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 21, 2024 03:46
— with
GitHub Actions
Inactive
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 21, 2024 03:46
— with
GitHub Actions
Inactive
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 21, 2024 03:46
— with
GitHub Actions
Inactive
wanliAlex
requested changes
Oct 22, 2024
tests/core/structured_vespa_index/test_structured_vespa_index.py
Outdated
Show resolved
Hide resolved
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 22, 2024 23:52
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 22, 2024 23:52
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 22, 2024 23:52
— with
GitHub Actions
Error
RaynorChavez
had a problem deploying
to
marqo-test-suite
October 22, 2024 23:53
— with
GitHub Actions
Error
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 23, 2024 00:04
— with
GitHub Actions
Inactive
RaynorChavez
temporarily deployed
to
marqo-test-suite
October 23, 2024 00:05
— with
GitHub Actions
Inactive
RaynorChavez
requested a deployment
to
marqo-test-suite
October 23, 2024 00:05
— with
GitHub Actions
In progress
wanliAlex
approved these changes
Oct 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix
What is the current behavior? (You can also link to an open issue here)
Scenario 1:
{"_id": "1_map", "text_field": "a photo of a cat", "map_score_mods_float": {"a.subsubfield": 0.5}},
"add_to_score": [{"field_name": "map_score_mods_float.a.subsubfield", "weight": 2}]
Scenario 2:
{"_id": "1_map", "text_field": "a photo of a cat", "map_score_mods_float": {"a"subsubfield": 0.5}},
Failed for special character '"': MarqoWebError: MarqoWebError Error message: {'message': "Marqo encountered an unexpected internal error.\nPlease create an issue on Marqo's GitHub repo (https://github.com/marqo-ai/marqo/issues) if this problem persists.", 'code': None, 'type': None, 'link': ''} status_code: 500, type: None, code: None, link:
marqo.vespa.exceptions.VespaStatusError: 400: {"root":{"id":"toplevel","relevance":1.0,"fields":{"totalCount":0},"errors":[{"code":3,"summary":"Illegal query","message":"Could not set 'ranking.features.query(marqo__add_weights_tensor)' to '{\"map_score_mods_float.a\\\"subsubfield\": 2.0}': Could not parse '{\"map_score_mods_float.a\\\"subsubfield\": 2.0}' as a tensor of type tensor(p{}): At value position 26: Expected a ':' but got 's'"}]}}
Scenario 3:
\\
.
, expected behavior is that we no longer get an internal error saying too many values to unpack and that the score is correctly applied."
, expected behavior is that we no longer have the 500 internal error when searching andthat the score modifier is applied to the scoreAs discussed, we will let this silent error like other unicode characters until we hear back from the vespa team. Currently, we will encode " in unicode. I have confirmed that this will not match with documents explicitly containing the\u0022
encoding.The main changes to enable this were:
.
we simply split the query along the first.
character, resulting in only 2 partitions, instead of in all.
, which may result in multiple partitions if the query score modifier has more that one.
"
, Vespa seems to have a bug wherein it attempts to escape"
in the queries by transforming it to\\\"
, leading to an invalid query.To solve this without modifying vespa code, we switch to url encoding (where. Use"
is stored as%22
) in both documents and queries. Note that this only applies to the subfields of score modifier fields in both unstructured and structured indexesre.sub(r'(")', lambda m: r'\u0022', s)
.Have unit tests been run against this PR? (Has there also been any additional testing?)
Related Python client changes (link commit/PR here)
Related documentation changes (link commit/PR here)
Other information:
Please check if the PR fulfills these requirements