Skip to content

Commit

Permalink
enable token-based lexical search (#162)
Browse files Browse the repository at this point in the history
* enable token-based lexical search

* bump version to 1.11.0
  • Loading branch information
kdutia authored Dec 16, 2024
1 parent 362376a commit 4cb546e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/cpr_sdk/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_MAJOR = "1"
_MINOR = "10"
_PATCH = "2"
_MINOR = "11"
_PATCH = "0"
_SUFFIX = ""

VERSION_SHORT = "{0}.{1}".format(_MAJOR, _MINOR)
Expand Down
15 changes: 3 additions & 12 deletions src/cpr_sdk/yql_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,14 @@ def build_search_term(self) -> str:
elif self.sensitive:
return """
(
{"targetHits": 1000} weakAnd(
family_name_index contains(@query_string),
family_description_index contains(@query_string),
text_block contains(@query_string)
)
(userInput(@query_string))
)
"""
else:
return """
(
(
{"targetHits": 1000} weakAnd(
family_name_index contains(@query_string),
family_description_index contains(@query_string),
text_block contains(@query_string)
)
) or (
(userInput(@query_string))
or (
[{"targetNumHits": 1000}]
nearestNeighbor(family_description_embedding,query_embedding)
) or (
Expand Down

0 comments on commit 4cb546e

Please sign in to comment.