Skip to content

feat: add language attribute to RedisConfig#953

Merged
JoanFM merged 6 commits intomainfrom
feat-redis-chinese
Dec 20, 2022
Merged

feat: add language attribute to RedisConfig#953
JoanFM merged 6 commits intomainfrom
feat-redis-chinese

Conversation

@AnneYang720
Copy link
Copy Markdown
Contributor

@AnneYang720 AnneYang720 commented Dec 19, 2022

Signed-off-by: AnneY [email protected]

Goals:

Attribute language is added to RedisConfig, so that user can search in certain language, especially chinese.
#952

  • add code
  • add test
  • check and update documentation, if required. See guide

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 19, 2022

Codecov Report

Base: 83.00% // Head: 85.20% // Increases project coverage by +2.20% 🎉

Coverage data is based on head (9e0d066) compared to base (1443376).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #953      +/-   ##
==========================================
+ Coverage   83.00%   85.20%   +2.20%     
==========================================
  Files         155      155              
  Lines        8049     8050       +1     
==========================================
+ Hits         6681     6859     +178     
+ Misses       1368     1191     -177     
Flag Coverage Δ
docarray 85.20% <100.00%> (+2.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
docarray/array/storage/opensearch/find.py 96.66% <100.00%> (+20.00%) ⬆️
docarray/array/storage/redis/backend.py 97.54% <100.00%> (+1.67%) ⬆️
docarray/helper.py 82.75% <0.00%> (+0.38%) ⬆️
docarray/document/mixins/_property.py 86.45% <0.00%> (+0.64%) ⬆️
docarray/array/mixins/setitem.py 74.79% <0.00%> (+0.81%) ⬆️
docarray/array/mixins/plot.py 67.96% <0.00%> (+0.86%) ⬆️
docarray/array/storage/weaviate/backend.py 90.74% <0.00%> (+1.23%) ⬆️
docarray/array/storage/annlite/backend.py 97.46% <0.00%> (+1.26%) ⬆️
docarray/array/storage/opensearch/backend.py 95.89% <0.00%> (+1.36%) ⬆️
docarray/array/storage/elastic/backend.py 97.08% <0.00%> (+1.45%) ⬆️
... and 19 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@JoanFM JoanFM linked an issue Dec 19, 2022 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

📝 Docs are deployed on https://ft-feat-redis-chinese--jina-docs.netlify.app 🎉

the closest Document objects for each of the queries in `query`.
"""
query = np.array(query).astype(np.float)
query = np.array(query).astype(np.float32)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why touching opensearch at all?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

numpy has a new release three days ago and its version is updated to 1.24.0 in ci, where np.float and np.int is no longer available

@JoanFM JoanFM merged commit 7d998f1 into main Dec 20, 2022
@JoanFM JoanFM deleted the feat-redis-chinese branch December 20, 2022 20:59
bwanglzu pushed a commit that referenced this pull request Dec 21, 2022
* feat: add language to RedisConfig

Signed-off-by: AnneY <[email protected]>

* test: add test for redis chinese support

Signed-off-by: AnneY <[email protected]>

* docs: add language to RedisConfig

Signed-off-by: AnneY <[email protected]>

* fix: numpy is updated to 1.24.0

Signed-off-by: AnneY <[email protected]>

* fix: increase timeout-minutes for oldproto

Signed-off-by: AnneY <[email protected]>

Signed-off-by: AnneY <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is Chinese retrieval supported in Redis backend

3 participants