Filtering json strings
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 247
- Forks
- 66
- Merge medio
- 22 h 47 min
- PR fusionados (30 d)
- 8
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de typesense/typesense-python
-
`MultiSearchResponse` type does not account for union search response shapePosiblemente ocupada @tharropoulos la tomó hace 172 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
typesense/typesense-python#128 ·
-
`documents.Documents.import_()` `batch_size` argument is ignored, type of `import_parameters` is missing `batch_size`Posiblemente ocupada @tharropoulos la tomó hace 245 días. Abierto
Dificultad 2/5 1-2 días Aptitud para principiantes 68/100
typesense/typesense-python#124 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
typesense/typesense-python#100 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
typesense/typesense-python#122 · 3 comentarios ·
-
[Bug] - DeprecationWarning on instantiation of ClientPosiblemente ocupada @tharropoulos la tomó hace 266 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
typesense/typesense-python#114 · 8 comentarios ·
Todos los issues de typesense/typesense-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
iceboundrock/AutoForge#304 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fossasia/visdom-dev#77 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
aws-cloudformation/cfn-lint#4890 ·
Los mantenedores suelen responder en 2 días