Filtering json strings
还没有人认领这个 Issue。
评估
调研方向
Start by reproducing the filter_by query against the shown schema fields and Typesense version 0.15.0, focusing on the first_data and second_data JSON strings and the some_field array. Determine whether the behavior comes from the filter expression or string representation, then verify the expected result of matching records where either JSON field has a value.
由索引模型根据 Issue 内容生成。
描述
Description
I have two string fields that are part of my filter_by query: first_data and second_data. Either of these fields can have a value or none of them. Their values are set by encoding a Python dictionary to a json string e.g
first_dict = {'age':40}
second_dict = {}
first_data = json.dumps(first_dict, default=str)
second_data = json.dumps(first_dict, default=str)
Steps to reproduce
schema_fields = [
{
"name": "first_data", "type": "string",
},
{
"name": "second_data", "type": "string"
},
{
"name": "some_field", "type": "string[]"
}
]
# Note that I am only checking for emptiness in both fields. There is probably a better approach for this by I wonder this doesn't work
{
"q": "*",
"filter_by": "first_data:!={} && second_data:!={} && some_field:=[A,B]"
}
Expected Behavior
I expect to only see results that either first_data or second_data have a value
Actual Behavior
I see results have both first_data and second_data equal to {}

Metadata
Typesense Version: 0.15.0
OS: Ubuntu 22.04.2 LTS
- 主要语言
- Python
- 星标
- 247
- 派生
- 66
- 平均合并
- 22 小时 47 分钟
- 30 天内合并 PR
- 8
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
typesense/typesense-python 的其他 Issue
-
`MultiSearchResponse` type does not account for union search response shape可能已有人在做 @tharropoulos 于 172 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
typesense/typesense-python#128 ·
-
`documents.Documents.import_()` `batch_size` argument is ignored, type of `import_parameters` is missing `batch_size`可能已有人在做 @tharropoulos 于 245 天前认领。 未关闭
难度 2/5 1-2 天 新手友好度 68/100
typesense/typesense-python#124 ·
-
难度 1/5 1 小时以内 新手友好度 68/100
typesense/typesense-python#100 ·
-
难度 3/5 1-2 天 新手友好度 35/100
typesense/typesense-python#122 · 3 条评论 ·
-
[Bug] - DeprecationWarning on instantiation of Client可能已有人在做 @tharropoulos 于 266 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 55/100
typesense/typesense-python#114 · 8 条评论 ·
查看 typesense/typesense-python 的全部 Issue
相似的 Issue
-
good first issue infrastructure
难度 2/5 1-3 小时 新手友好度 76/100
kuznia-rdzeni/coreblocks#1135 ·
-
good first issue server
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
documentation priority: high
难度 2/5 1-3 小时 新手友好度 78/100
a-lex-s/mealie-telegram-bot#54 ·
维护者通常 1 天内回复
-
type/test
难度 2/5 1-3 小时 新手友好度 76/100
SaltedTan/virgil-language-server#218 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
btclib-org/btclib-wallet#541 ·
维护者通常 1 天内回复