Restriction to a single shard seems like a big limitation for us.
Also, I was hoping that this was something Solr provided out of the box.
(Like
https://lucene.apache.org/solr/guide/6_6/updating-parts-of-documents.html#UpdatingPartsofDocuments-In-PlaceUpdates
)
Something like:
{
"id":"parents-id",
"price":{"set":99},
"popularity":{"inc":20},
"children": {"add": {child document(s)}}
}
or something like:
{
"id":"child-id",
"parentId": "parents-id"
... normal fields of the child ...
"operationType": "add | delete"
}
In both the cases, Solr can just look at the parents' ID, route the
document to the correct shard and add the child to the parent to create the
full nested document (as in block join), that would be ideal.
Thanks
SG
On Wed, Jan 17, 2018 at 9:58 PM, Gus Heck wrote:
> If the document routing can be arranged such that the children and the
> parent are always co-located in the same shard, and share an identifier,
> the graph query can pull back the parent plus any arbitrary number of
> "children" that have been added at any time in any order. In this scheme
> "children" are just things that match your graph query... (
> https://lucene.apache.org/solr/guide/6_6/other-parsers.html#OtherParsers-
> GraphQueryParser)
> However, if your query has to cross shards, that won't work (yet...
> https://issues.apache.org/jira/browse/SOLR-11384).
>
> More info here:
> https://www.slideshare.net/lucidworks/solr-graph-query-
> presented-by-kevin-watters-kmw-technology
>
> On Mon, Jan 15, 2018 at 2:09 PM, S G wrote:
>
> > Hi,
> >
> > We have a use-case where a single document can contain thousands of child
> > documents.
> > However, I could not find any way to do it incrementally.
> > Only way is to read the full document from Solr, add the new child
> document
> > to it and then re-index the full document will all of its child documents
> > again.
> > This causes lot of reads from Solr just to form the document with one
> extra
> > document.
> > Ideally, I would have liked to only send the parent-ID and the
> > child-document only as part of an "incremental update" command to Solr.
> >
> > Is there a way to incrementally add a child document to a parent
> document?
> >
> > Thanks
> > SG
> >
>
>
>
> --
> http://www.the111shift.com
>