Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

134
Vistas
Can elastic search provide nested json results?

I know that elastic search provides good support for nested json. It has very good support for nested objects with advance indexing.

So, when I make a nested query in elastic search, can the query result be obtained in original nested form ? Or is the query result in flattened form like that in lucene or solr ?

Note: I have used apache solr and lucene before. And, I am evaluating other different search platforms for better support for nested json objects.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I'm giving you a simple example of results maintaining the depth.

PUT people { "mappings": { "list": { "properties": { "name": { "type": "nested" } } } } }

PUT people/list/1 { "age" : "19", "name" : [ { "first" : "John", "last" : "Smith" } ] }

PUT people/list/2 { "age" : "23", "name" : [ { "first" : "Wilber", "last" : "Smith" } ] }

GET people/list/_search { "query": { "match_all": {} } }

As far as I understand, you'll prefer nested mapping to object mapping. Because object would flatten results. See this for reference: https://www.elastic.co/guide/en/elasticsearch/reference/2.4/nested.html

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda