How to retrieve nested documents (parents and their children together) ?
https://lucene.apache.org/solr/guide/7_4/other-parsers.html#block-join-parent-query-parser talks about {!parent which=} docs>, which returns parent docs only, and {!child of=} , which returns child docs only. Is there a way to retrieve the matched documents in the original, nested form? Using the sample document, is there way to get: 1 Solr has block join support parentDocument 2 SolrCloud supports it too! rather than just the parent or the child docs?
Re: How to retrieve nested documents (parents and their children together) ?
Hello, Check [child] https://lucene.apache.org/solr/guide/7_4/transforming-result-documents.html#child-childdoctransformerfactory or [subquery]. Although, it's worth to put reference to it somewhere in blockjoin qparsers. Documentation patches are welcome. On Sun, Jul 22, 2018 at 10:25 AM TK Solr wrote: > > https://lucene.apache.org/solr/guide/7_4/other-parsers.html#block-join-parent-query-parser > > talks about {!parent which=} child > docs>, which returns parent docs only, and > {!child of=} , > which > returns child docs only. > > Is there a way to retrieve the matched documents in the original, nested > form? > Using the sample document, is there way to get: > > >1 >Solr has block join support >parentDocument > >2 >SolrCloud supports it too! > > > > rather than just the parent or the child docs? > > > -- Sincerely yours Mikhail Khludnev
Solr [subquery] document transformer
Good afternoon knowledgeable solr community. I’m experiencing problems using a document transformer across a multiple shard collection and am wondering if anyone would please be able to assist or provide some guidance? The document transformer query below works nicely until I split the collection into multiple shards and then I receive what appears to be an authentication issue on the subquery. My query configuration (the original query returns a document with a field link to another ‘parent’ document) "parent.q":"{!edismax qf=CHILD_ID v=$row.PARENT_ID _route_=PARENT_ID!}", "parent.fl":"*", "parent.rows":1, "fl":"…other fields to display, parent:[subquery]", Environment: SolrCloud (7.3.1) Https Rules based authentication provider Any advice would be appreciated. DH 2018-07-23 11:43:06,445 5471250 ERROR : [c:my_collection s:shard1 r:core_node3 x: my_collection_shard1_replica_n1] org.apache.solr.common.SolrException : org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at https://serverName:9021/solr/my_collection_shard3_replica_n4: Expected mime type application/octet-stream but got text/html. Error 401 require authentication HTTP ERROR 401 Problem accessing /solr/my_collection_shard3_replica_n4/select. Reason: require authentication at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:607) at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255) at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244) at org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1219) at org.apache.solr.handler.component.HttpShardHandler.lambda$submit$0(HttpShardHandler.java:172) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176) at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:188) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) https://serverName:9021/solr/my_collection_shard1_replica_n1: parsing error at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:616) at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255) at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244) at org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1219) at org.apache.solr.handler.component.HttpShardHandler.lambda$submit$0(HttpShardHandler.java:172) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176) at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:188) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.solr.common.SolrException: parsing error at org.apache.solr.client.solrj.impl.BinaryResponseParser.processResponse(BinaryResponseParser.java:52) at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:614) ... 12 more Caused by: java.io.EOFException at org.apache.solr.common.util.FastInputStream.readByte(FastInputStream.java:207) at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:255) at org.apache.solr.common.util.JavaBinCodec.readArray(JavaBinCodec.java:747) at org.apache.solr.common.util.JavaBinCodec.readObject(JavaBinCodec.java:272) at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:256) at org.apache.solr.common.util.JavaBinCodec.readSolrDocumentList(JavaBinCodec.java:555) at org.apache.solr.common.util.JavaBinCodec.readObject(JavaBinCodec.java:307) at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:256) at org.apache.solr.common.util.JavaBinCodec.readOrderedMap(JavaBinCodec.java:200) at org.apache.solr.common.util.JavaBinCodec.readObject(JavaBi