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

Fix map field's prefix not being set in marqo__field_types when partial updating + add api tests #1144

Closed

Conversation

adityabharadwaj198
Copy link
Member

@adityabharadwaj198 adityabharadwaj198 commented Mar 12, 2025

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
  1. Fixed a bug where when we insert a map using partial updates, the map prefix in a flattened map field name was not getting set in marqo__field_types
  2. Adds some API tests in correspondence with the set of manual tests that we were running
  • What is the current behavior? (You can also link to an open issue here)

  • wrt the bug - currently if a map is inserted via a partial update (it must not exist from before), the marqo__field_types will consist of int_map.key1, int_map.key2 but no int_map. This doesn't happen when inserting maps via add_docs and is critical to prevent type conversions.

  • What is the new behavior (if this is a feature change)?

  • if a map is inserted via a partial update (it must not exist from before), the marqo__field_types will consist of int_map.key1: int_map_entry, int_map.key2: int_map_entry & int_map: int_map_entry.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

  • No

  • Have unit tests been run against this PR? (Has there also been any additional testing?)

  • Yes

  • Related Python client changes (link commit/PR here)

  • NA

  • Related documentation changes (link commit/PR here)

  • Other information:

  • Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added / updated (for bug fixes / features)

…fields, adding new maps with docs resulted in map type issues & later didn't allow us to properly update maps in subsequent calls.

Also added more robust testing where we are now testing the field_type metadata & running every test through 3 different docs
…n_uuid is updated everytime a map update happens.
mostly added more test cases and fixed logging in some existing ones
…n-uuid

# Conflicts:
#	src/marqo/core/semi_structured_vespa_index/semi_structured_vespa_index.py
#	tests/integ_tests/core/document/test_partial_update_semi_structured.py
Copy link
Collaborator

@farshidz farshidz left a comment

Choose a reason for hiding this comment

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

One issue with _assert_field_types. It verifies expected fields are found, but doesn't check for extra fields in the Vespa doc. You want to make sure the Vespa doc has all required field types and only those fields not more

@adityabharadwaj198
Copy link
Member Author

Releases/2.16 branch version of this PR is approved and will be merged into mainline. Closing this PR in favor of that one: #1146

@adityabharadwaj198 adityabharadwaj198 deleted the aditya/partial-updates-add-more-api-tests branch March 14, 2025 07:25
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.

2 participants