I have been working with a parent child schema creation and I was wondering if there is a way to perform a search in children documents with the query "where parent exists" and get only those documents.
I can index children documents and there is no mandatory to have parent document. Therefore, I want only to get the children who have a parent document.
Is this functionality possible? How is possible to perform such query? I work with latest version 1.0.0.RC1
I have been working with a parent child schema creation and I was
wondering if there is a way to perform a search in children documents with
the query "where parent exists" and get only those documents.
I can index children documents and there is no mandatory to have parent
document. Therefore, I want only to get the children who have a parent
document.
Is this functionality possible? How is possible to perform such query? I
work with latest version 1.0.0.RC1
This sounds like what I was looking for Will investigate it
Thanks
Thomas
On Thursday, 23 January 2014 20:25:01 UTC+2, Thomas wrote:
Hi,
I have been working with a parent child schema creation and I was
wondering if there is a way to perform a search in children documents with
the query "where parent exists" and get only those documents.
I can index children documents and there is no mandatory to have parent
document. Therefore, I want only to get the children who have a parent
document.
Is this functionality possible? How is possible to perform such query? I
work with latest version 1.0.0.RC1
I have been reading the documentation and at some point it described
that all _ids are loaded into memory:
all _id values are loaded to memory (heap) in order to support fast lookups
This means that only the parent _ids that match correct? Not all the _ids
of the parent/child relationship
Is it possible to perform an aggregation and take some values from the
parent document and some from the child document? for example take some
information from the parent document (e.g. city) and some information from
the child document (e.g. for car model= BMW) and do some counts? and
present them all together?
e.g.
{
"parentDoc":{
"properties": {
"city":{
"type": "string",
"index": "not_analyzed"
}
}
}
}
{
"childDoc":{
"properties": {
"carModel":{
"type": "string",
"index": "not_analyzed"
}
}
}
}
Aggregate child documents per child Document where parent exists (because i
have childDocuments without parent info and i do not want to take those)
per city and carModel. Below is an idea of what I'm trying to do
On Thursday, 23 January 2014 20:25:01 UTC+2, Thomas wrote:
Hi,
I have been working with a parent child schema creation and I was
wondering if there is a way to perform a search in children documents with
the query "where parent exists" and get only those documents.
I can index children documents and there is no mandatory to have parent
document. Therefore, I want only to get the children who have a parent
document.
Is this functionality possible? How is possible to perform such query? I
work with latest version 1.0.0.RC1
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.