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 hybrid_parameters to search #235

Merged
merged 10 commits into from
Jul 10, 2024
Merged

add hybrid_parameters to search #235

merged 10 commits into from
Jul 10, 2024

Conversation

vicilliar
Copy link
Contributor

  • 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 hybrid search parameters

  • What is the new behavior (if this is a feature change)?
    New parameter: hybrid_parameters added to search endpoint to enable hybrid search

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

  • Other information:

Tensor = 'tensor'
Lexical = 'lexical'

class HybridParameters:
Copy link
Collaborator

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?

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

src/marqo/models/search_models.py Show resolved Hide resolved
"""

index_test_cases = [
(CloudTestIndex.structured_text, self.structured_index_name) # TODO: unstructured
Copy link
Collaborator

Choose a reason for hiding this comment

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

TODO for unstructured indexes

wanliAlex
wanliAlex previously approved these changes Jul 10, 2024
from abc import ABC
from enum import Enum

from pydantic import validator, BaseModel, root_validator
Copy link
Collaborator

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

@farshidz farshidz merged commit d45985c into mainline Jul 10, 2024
2 of 4 checks passed
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.

3 participants