Filtering json strings
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Python
- Estrelas
- 247
- Forks
- 66
- Merge médio
- 22h 47min
- PRs com merge (30d)
- 8
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de typesense/typesense-python
-
`MultiSearchResponse` type does not account for union search response shapeTalvez já em andamento @tharropoulos assumiu há 172 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
typesense/typesense-python#128 ·
-
`documents.Documents.import_()` `batch_size` argument is ignored, type of `import_parameters` is missing `batch_size`Talvez já em andamento @tharropoulos assumiu há 245 dias. Aberta
Dificuldade 2/5 1-2 dias Facilidade para iniciantes 68/100
typesense/typesense-python#124 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 68/100
typesense/typesense-python#100 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
typesense/typesense-python#122 · 3 comentários ·
-
[Bug] - DeprecationWarning on instantiation of ClientTalvez já em andamento @tharropoulos assumiu há 266 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
typesense/typesense-python#114 · 8 comentários ·
Todas as issues de typesense/typesense-python
Issues semelhantes
-
good first issue infrastructure
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
kuznia-rdzeni/coreblocks#1135 ·
-
good first issue server
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
documentation priority: high
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
a-lex-s/mealie-telegram-bot#54 ·
Mantenedores costumam responder em até 1 dia
-
type/test
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
SaltedTan/virgil-language-server#218 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
btclib-org/btclib-wallet#541 ·
Mantenedores costumam responder em até 1 dia