OK, no he podido resolver esto hasta ahora. Esperando que alguien pueda ofrecer alguna idea.Cómo buscar objetos anidados con elástico-search
Teniendo en cuenta los siguientes documentos, ¿cómo buscaría todos los documentos con un video que tenga "prueba" en el título del video? Estoy usando la API HTTP. (Básicamente, ¿cómo buscar objetos anidados con elasticsearch? Sé que tiene que ser docs por ahí, pero realmente no han podido encontrar ninguna.)
[{
id:4635,
description:"This is a test description",
author:"John",
author_id:51421,
video: {
title:"This is a test title for a video",
description:"This is my video description",
url:"/url_of_video"
}
},
{
id:4636,
description:"This is a test description 2",
author:"John",
author_id:51421,
video: {
title:"This is an example title for a video",
description:"This is my video description2",
url:"/url_of_video2"
}
},
{
id:4637,
description:"This is a test description3",
author:"John",
author_id:51421,
video: {
title:"This is a test title for a video3",
description:"This is my video description3",
url:"/url_of_video3"
}
}]
No necesita necesariamente anidar el vide. Ver http://www.elasticsearch.org/blog/2010/02/12/yourdatayoursearch.html y mi respuesta a continuación. – dira
Aquí está el enlace actualizado: http://www.elasticsearch.org/blog/your-data-your-search/ – swatkins
Esta publicación del blog me pareció realmente útil también: http://www.elasticsearch.org/blog/managing -relations-inside-elasticsearch/ – Quin