-
Notifications
You must be signed in to change notification settings - Fork 5
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 hybrid_parameters to search #235
Conversation
src/marqo/models/search_models.py
Outdated
Tensor = 'tensor' | ||
Lexical = 'lexical' | ||
|
||
class HybridParameters: |
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.
Should this be a pydantic class and the field names are in camelCase
?
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.
Ah yep it should be a pydantic class. We want the field names in snake case though, right?
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.
Yes, the original field name should be in the snake case for the Python client user. Note that the query sent to Marqo should be converted to the camelCase
as APIs using the alias feature.
tests/v2_tests/test_hybrid_search.py
Outdated
""" | ||
|
||
index_test_cases = [ | ||
(CloudTestIndex.structured_text, self.structured_index_name) # TODO: unstructured |
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.
TODO for unstructured indexes
…nto joshua/hybrid-search
from abc import ABC | ||
from enum import Enum | ||
|
||
from pydantic import validator, BaseModel, root_validator |
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.
nit: Let's do an import clean to remove a lot of unused imports
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 hybrid search parameters
What is the new behavior (if this is a feature change)?
New parameter:
hybrid_parameters
added tosearch
endpoint to enable hybrid searchDoes this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
no
Other information: