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

POC: using a single kNN opensearch field #509

Closed
wants to merge 4 commits into from

Conversation

pandu-k
Copy link
Collaborator

@pandu-k pandu-k commented Jun 16, 2023

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • What is the current behavior? (You can also link to an open issue here)

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

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

  • 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

  • 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)

return f"{searchable_attribs_filter}{contextualised_user_filter}"


def build_searchable_attributes_filter(vector_properties_to_search: Sequence) -> str:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@vicilliar Logic for a creating searchable attributes filter

@@ -87,21 +87,7 @@ def add_customer_field_properties(config: Config, index_name: str,
multimodal_customer_field_names = set([(field_name, "_") for field_name in list(multimodal_combination_fields)])
knn_field_names = knn_field_names.union(multimodal_customer_field_names)

body = {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is called once per field?

# {'Description': {'type': 'text'}, {'Description': {'type': 'text'},
# 'Genre': {'type': 'text'}, 'Genre': {'type': 'text'},
# 'Title': {'type': 'text'}, 'Title': {'type': 'text'},
# 'my_combination_field': {'properties': {'lexical_field': {'type': 'text'}, -----> 'my_combination_field.lexical_field': {'type': 'text'},
Copy link
Contributor

Choose a reason for hiding this comment

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

what if the field name has a .

@pandu-k pandu-k closed this Jul 6, 2023
@pandu-k pandu-k deleted the pandu/single-knn-field-POC branch July 6, 2023 22:37
@pandu-k pandu-k mentioned this pull request Jul 6, 2023
3 tasks
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