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 new fieldtypes for dict score modifiers #241

Merged
merged 8 commits into from
Jul 1, 2024

Conversation

RaynorChavez
Copy link
Member

@RaynorChavez RaynorChavez commented Jun 24, 2024

  • 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)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Feature

  • What is the current behavior? (You can also link to an open issue here)
    No FieldTypes defined for map score modifiers

  • What is the new behavior (if this is a feature change)?
    Added 4 new map numeric fieldtypes for dictionary score modifiers. Removed superfluour __marqo_version__ variable

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

  • Other information:

@@ -97,7 +97,7 @@ def test_valid_score_modifiers_format(self):
"add_to_score": [
{"field_name": "add_1", "weight" : -3,
},
{"field_name": "add_2", "weight": 1,
{"field_name": "add_2.a", "weight": 1,
}]
}
self.search_with_score_modifier(score_modifiers=valid_score_modifiers)
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's no assertion in this test. what is the expected behaviour?

"add_to_score": [
{"field_name": "add_1", "weight" : 4,
},
{"field_name": "add_2", "weight": 1,
{"field_name": "add_2.a", "weight": 1,
}]
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the assertion for this test is too wide. we should at least test the error code and some key word in the response if there's any

Copy link
Collaborator

@papa99do papa99do left a comment

Choose a reason for hiding this comment

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

Some minor issue of an existing test. not related to your change.


# NOTE: This isn't used anywhere
Copy link
Collaborator

Choose a reason for hiding this comment

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

So why do we need this if it's not used in any places?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't totally remove def supported_marqo_version() yet as someone might have a comment on its use.

__marqo_version__ is removed though.

Copy link
Collaborator

@papa99do papa99do left a comment

Choose a reason for hiding this comment

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

LGTM

@RaynorChavez RaynorChavez merged commit 42d8fd1 into mainline Jul 1, 2024
4 of 5 checks passed
@RaynorChavez RaynorChavez deleted the raynor/score_modifiers branch July 2, 2024 05:39
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