Hello,
note
https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-BlockJoinQueryParsers

> The syntax for this parser is: q={!child of=<allParents>}<someParents>.

Thus it should be:
{!child of='ps:[* TO *]'}ps:PS1

it yields doc 2 with Martin


On Wed, Aug 12, 2015 at 9:54 AM, MOIS Martin (MORPHO) <
martin.m...@morpho.com> wrote:

> Hello,
>
> currently I am evaluating the block join children query parser. But it
> always returns "Parent query yields document which is not matched by
> parents filter".
>
> What I have done so far:
>
> I have added the _root_ field to the schema: <field name="_root_"
> type="string" indexed="true" stored="false"/>.
> I have created a collection: curl
> http://localhost:8983/solr/admin/collections?action=CREATE&name=nestedPerson&numShards=6&collection.configName=mim
> I have enrolled this documents to the collection: curl
> http://localhost:8983/solr/nestedPerson/update?commitWithin=3000 -d '
> <add>
>         <doc>
>                        <field name="id">1</field>
>                        <field name="ps">PS1</field>
>                                <field name="deceased">false</field>
>                        <doc>
>                                        <field name="id">2</field>
>                                        <field name="cs">CS1</field>
>                                                <field
> name="firstName">Martin</field>
>                        </doc>
>         </doc>
>         <doc>
>                        <field name="id">3</field>
>                        <field name="ps">PS2</field>
>                        <field name="deceased">true</field>
>                        <doc>
>                                        <field name="id">4</field>
>                                        <field name="cs">CS2</field>
>                                        <field
> name="firstName">Stefan</field>
>                        </doc>
>         </doc>
> </add>'
>
> Now I issue the following query: {!child of=ps:PS1}firstName:Martin. This
> returns an error message:
> "error": {
>     "msg": "Error from server at
> http://bigdata2:8983/solr/nestedPerson_shard1_replica1: Parent query
> yields document which is not matched by parents filter, docID=0",
>     "trace":
> "org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:
> Error from server at
> http://bigdata2:8983/solr/nestedPerson_shard1_replica1: Parent query
> yields document which is not matched by parents filter, docID=0\n\tat
> org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:560)\n\tat
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:235)\n\tat
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:227)\n\tat
> org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1220)\n\tat
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:218)\n\tat
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:183)\n\tat
> java.util.concurrent.FutureTask.run(FutureTask.java:262)\n\tat
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)\n\tat
> java.util.concurrent.FutureTask.run(FutureTask.java:262)\n\tat
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:148)\n\tat
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\n\tat
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n\tat
> java.lang.Thread.run(Thread.java:745)\n",
>     "code": 500
>   }
>
> Interestingly the block join parent query parser returns a valid result
> set for this query: {!parent which=ps:PS1}firstName:Martin
>
> Do you have any idea why the children query parser leads to an error and
> the parent query parser not?
>
> I am using Solr 5.2.0 (5.2.0 1683206 - anshumgupta - 2015-06-02 18:32:43).
> It is a cloud installation (using zookeeper) with 6 nodes (one shard per
> node).
>
> Best Regards,
> Martin Mois
> #
> " This e-mail and any attached documents may contain confidential or
> proprietary information. If you are not the intended recipient, you are
> notified that any dissemination, copying of this e-mail and any attachments
> thereto or use of their contents by any means whatsoever is strictly
> prohibited. If you have received this e-mail in error, please advise the
> sender immediately and delete this e-mail and all attached documents from
> your computer system."
> #
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mkhlud...@griddynamics.com>

Reply via email to