Re: Solr querying nested documents with ChildDocTransformerFactory, get “Parent query yields document which is not matched by parents filter”

2017-02-06 Thread David Kramer
   > > · The "id" field in our data is unique within datatype, 
but
> not
> > across datatypes. We added a "uuid" field in our program that
> generates the
> > Solr import file that is the id prefixed by the first letter of 
the
> > docType, like P12345. That makes the uuid field unique, and we 
have
> that as
> > the uniqueKey in our schema.xml.
> > · We are trying to retrieve the parent Product, and all
> children
> > documents. As such, we are using the ChildDocTransformerFactory
> > ([child...]) to retrieve the children along with the parent. We 
have
> not
> > yet solved the problem of getting items within SKUs as nested
> documents in
> > the results, and we will have to figure that out at some point, 
but
> for now
> > we get them flattened
> > · We are building out the proof of concept for this. 
This is
> all
> > new work, so we are free to change a lot.
> > · This is Solr 6.0.0, and we are importing in JSON 
format,
> if that
> > matters
> > · I submitted this question to StackOverflow<http://
> > stackoverflow.com/questions/41969353/solr-querying-nested-
> documents-with-
> > childdoctransformerfactory-get-parent-quer> but haven’t gotten 
any
> > answers yet.
> >
> >
> > Our data looks like this (I've removed some fields for 
simplicity):
> >
> > {
> >
> >   "id": 739063,
> >
> >   "docType": "Product",
> >
> >   "uuid": "P739063",
> >
> >   "_childDocuments_": [
> >
> > {
> >
> >   "id": 1537378,
> >
> >   "price": 25.45,
> >
> >   "color": "Blush",
> >
> >   "docType": "Item",
> >
> >   "productId": 739063,
> >
> >   "uuid": "I1537378",
> >
> >   "_childDocuments_": [
> >
> > {
> >
> >   "id": 12799578,
> >
> >   "size": "10",
> >
> >   "width": "W",
    > >
> >   "docType": "Sku",
> >
> >   "itemId": 1537378,
> >
> >   "uuid": "S12799578"
> >
> > }
> >
> >   ]
> >
> > }
> >
> > }
> >
> >
> >
> > The query to fetch all Products and their children nested inside
> them is
> > q=docType:Product=title,id,docType,[child
> > parentFilter=docType:Product]. When I run that query, all is 
well,
> and it
> > returns the first 10 rows. However, if I fetch more rows by 
adding,
> say
> > =500, we get the error Parent query yields document which 
is not
> > matched by parents filter, docID=XXX.
> >
> > When we first saw that error, we discovered our id field was not
> unique
> > across document types, so we added the uuid field as mentioned
> above, which
> > is. we also added in our schema.xml file, wiped the core, 
recreated
> it, and
> > restarted Solr just to make sure it was in effect. We have 
double
> checked
> > and are sure that the uuid fields are unique.
> >
> >
> >
> > In all the search results for that error that I've found, the 
OP did
> not
> > 

Re: Solr querying nested documents with ChildDocTransformerFactory, get “Parent query yields document which is not matched by parents filter”

2017-02-02 Thread David Kramer
ave
> not
> > yet solved the problem of getting items within SKUs as nested
> documents in
> > the results, and we will have to figure that out at some point, but
> for now
> > we get them flattened
> > · We are building out the proof of concept for this. This is
> all
> > new work, so we are free to change a lot.
> > · This is Solr 6.0.0, and we are importing in JSON format,
> if that
> > matters
> > · I submitted this question to StackOverflow<http://
> > stackoverflow.com/questions/41969353/solr-querying-nested-
> documents-with-
> > childdoctransformerfactory-get-parent-quer> but haven’t gotten any
> > answers yet.
> >
> >
> > Our data looks like this (I've removed some fields for simplicity):
> >
> > {
> >
> >   "id": 739063,
> >
> >   "docType": "Product",
> >
> >   "uuid": "P739063",
> >
> >   "_childDocuments_": [
> >
> > {
> >
> >   "id": 1537378,
> >
> >   "price": 25.45,
> >
> >   "color": "Blush",
> >
> >   "docType": "Item",
> >
> >   "productId": 739063,
> >
> >   "uuid": "I1537378",
> >
> >   "_childDocuments_": [
> >
> > {
> >
> >   "id": 12799578,
> >
> >   "size": "10",
> >
> >   "width": "W",
> >
> >   "docType": "Sku",
> >
> >   "itemId": 1537378,
> >
> >   "uuid": "S12799578"
> >
> > }
> >
> >   ]
> >
> > }
> >
> > }
> >
> >
> >
> > The query to fetch all Products and their children nested inside
> them is
> > q=docType:Product=title,id,docType,[child
> > parentFilter=docType:Product]. When I run that query, all is well,
> and it
> > returns the first 10 rows. However, if I fetch more rows by adding,
> say
> > =500, we get the error Parent query yields document which is 
not
> > matched by parents filter, docID=XXX.
> >
> > When we first saw that error, we discovered our id field was not
> unique
> > across document types, so we added the uuid field as mentioned
> above, which
> > is. we also added in our schema.xml file, wiped the core, recreated
> it, and
> > restarted Solr just to make sure it was in effect. We have double
> checked
> > and are sure that the uuid fields are unique.
> >
> >
> >
> > In all the search results for that error that I've found, the OP did
> not
> > have a field that could differentiate the different document types,
> but as
> > you see we do. Since both the query and the parentFilter are
> searching for
> > docType:Product I don't see how either could possibly return
> anything but
> > parents. We've also tried adding childFilter=docType:Item and
> > childFilter=docType:Sku but that did not help.  I also tried using
> title:*
> > for the filter since only products have titles.
> >
> >
> >
> > Is there anything else we can try?
> >
> > Any explanation of this?
> >
> > Is it possible that it's not using uuid as the unique identifier 
even
> > though it's specified in the schema.xml, and would that even cause
> this?
> >
> > Thanks.
> >
> >
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>
>
>


-- 
Sincerely yours
Mikhail Khludnev




Re: Solr querying nested documents with ChildDocTransformerFactory, get “Parent query yields document which is not matched by parents filter”

2017-02-02 Thread Mikhail Khludnev
David,
I hardly get the way which IDs are assigned, but beware that repeating
uniqueKey
value causes deleting former occurrence. In case of block join index it
corrupts block structure: parent can't be deleted and left children orphans
(.. so touching, I'm sorry). Just make sure that number of deleted docs is
0 at first.

On Thu, Feb 2, 2017 at 6:20 PM, David Kramer <david.kra...@shoebuy.com>
wrote:

> Thanks, for responding. Mikhail.  There are no deleted documents.  Since
> I’m fairly new to Solr, one of the things I’ve been paranoid about is I
> have no way of validating my schema.xml, or know whether Solr is even using
> it (I have evidence it’s not, more below). So for each test, I’ve wiped out
> the index, recreated, and reimported.
>
> Back to whether my schema.xml is being used, I mentioned that I had to
> come up with a compound UUID field of the first character of the docType
> plus the ID, and we put “uuid” (was id) in our
> schema.xml.  Then I deleted and recreated the index and restarted Solr.  In
> order to verify it was working, I created an import file that had unique
> IDs but UUIDs which were duplicates of existing records, and it imported
> the new records even though the UUIDs existed in the database already.  I’m
> not sure if Solr should have produced an error or not. I’ll research that,
> but I mention that here in case it’s relevant.
>
> Thanks.
>
> On 2/2/17, 6:10 AM, "Mikhail Khludnev" <m...@apache.org> wrote:
>
> David,
>
> Can you make sure your index doesn't have deleted docs? This  can be
> seen
> in SolrAdmiun.
> And can you merge index to avoid having them in the index?
>
> On Thu, Feb 2, 2017 at 12:29 AM, David Kramer <
> david.kra...@shoebuy.com>
> wrote:
>
> >
> >
> > Some background:
> > · The data involved is catalog data, with three nested
> objects:
> > Products, Items, and Skus, in that order. We have a docType field on
> each
> > record as a differentiator.
> > · The "id" field in our data is unique within datatype, but
> not
> > across datatypes. We added a "uuid" field in our program that
> generates the
> > Solr import file that is the id prefixed by the first letter of the
> > docType, like P12345. That makes the uuid field unique, and we have
> that as
> > the uniqueKey in our schema.xml.
> > · We are trying to retrieve the parent Product, and all
> children
> > documents. As such, we are using the ChildDocTransformerFactory
> > ([child...]) to retrieve the children along with the parent. We have
> not
> > yet solved the problem of getting items within SKUs as nested
> documents in
> > the results, and we will have to figure that out at some point, but
> for now
> > we get them flattened
> > · We are building out the proof of concept for this. This is
> all
> > new work, so we are free to change a lot.
> > · This is Solr 6.0.0, and we are importing in JSON format,
> if that
> > matters
> > · I submitted this question to StackOverflow<http://
> > stackoverflow.com/questions/41969353/solr-querying-nested-
> documents-with-
> > childdoctransformerfactory-get-parent-quer> but haven’t gotten any
> > answers yet.
> >
> >
> > Our data looks like this (I've removed some fields for simplicity):
> >
> > {
> >
> >   "id": 739063,
> >
> >   "docType": "Product",
> >
> >   "uuid": "P739063",
> >
> >   "_childDocuments_": [
> >
> > {
> >
> >   "id": 1537378,
> >
> >   "price": 25.45,
> >
> >   "color": "Blush",
> >
> >   "docType": "Item",
> >
> >   "productId": 739063,
> >
> >   "uuid": "I1537378",
> >
> >   "_childDocuments_": [
> >
> > {
> >
> >       "id": 12799578,
> >
> >   "size": "10",
> >
> >   "width": "W",
> >
> >   "docType": "Sku",
> >
> >   "itemId": 1537378,
> >
> >   "uuid": "S12799578"
> >
&g

Re: Solr querying nested documents with ChildDocTransformerFactory, get “Parent query yields document which is not matched by parents filter”

2017-02-02 Thread David Kramer
Thanks, for responding. Mikhail.  There are no deleted documents.  Since I’m 
fairly new to Solr, one of the things I’ve been paranoid about is I have no way 
of validating my schema.xml, or know whether Solr is even using it (I have 
evidence it’s not, more below). So for each test, I’ve wiped out the index, 
recreated, and reimported. 

Back to whether my schema.xml is being used, I mentioned that I had to come up 
with a compound UUID field of the first character of the docType plus the ID, 
and we put “uuid” (was id) in our schema.xml.  Then I 
deleted and recreated the index and restarted Solr.  In order to verify it was 
working, I created an import file that had unique IDs but UUIDs which were 
duplicates of existing records, and it imported the new records even though the 
UUIDs existed in the database already.  I’m not sure if Solr should have 
produced an error or not. I’ll research that, but I mention that here in case 
it’s relevant.

Thanks.

On 2/2/17, 6:10 AM, "Mikhail Khludnev" <m...@apache.org> wrote:

David,

Can you make sure your index doesn't have deleted docs? This  can be seen
in SolrAdmiun.
And can you merge index to avoid having them in the index?

On Thu, Feb 2, 2017 at 12:29 AM, David Kramer <david.kra...@shoebuy.com>
wrote:

>
>
> Some background:
> · The data involved is catalog data, with three nested objects:
> Products, Items, and Skus, in that order. We have a docType field on each
> record as a differentiator.
> · The "id" field in our data is unique within datatype, but not
> across datatypes. We added a "uuid" field in our program that generates 
the
> Solr import file that is the id prefixed by the first letter of the
> docType, like P12345. That makes the uuid field unique, and we have that 
as
> the uniqueKey in our schema.xml.
> · We are trying to retrieve the parent Product, and all children
> documents. As such, we are using the ChildDocTransformerFactory
> ([child...]) to retrieve the children along with the parent. We have not
> yet solved the problem of getting items within SKUs as nested documents in
> the results, and we will have to figure that out at some point, but for 
now
> we get them flattened
> · We are building out the proof of concept for this. This is all
> new work, so we are free to change a lot.
> · This is Solr 6.0.0, and we are importing in JSON format, if that
> matters
> · I submitted this question to StackOverflow<http://
> stackoverflow.com/questions/41969353/solr-querying-nested-documents-with-
> childdoctransformerfactory-get-parent-quer> but haven’t gotten any
> answers yet.
>
>
> Our data looks like this (I've removed some fields for simplicity):
>
> {
>
>   "id": 739063,
>
>   "docType": "Product",
>
>   "uuid": "P739063",
>
>   "_childDocuments_": [
>
> {
>
>   "id": 1537378,
>
>   "price": 25.45,
>
>   "color": "Blush",
>
>   "docType": "Item",
>
>   "productId": 739063,
>
>   "uuid": "I1537378",
>
>   "_childDocuments_": [
>
> {
>
>   "id": 12799578,
>
>   "size": "10",
>
>   "width": "W",
>
>   "docType": "Sku",
>
>       "itemId": 1537378,
>
    >   "uuid": "S12799578"
>
> }
>
>   ]
>
> }
>
> }
>
>
>
> The query to fetch all Products and their children nested inside them is
> q=docType:Product=title,id,docType,[child
> parentFilter=docType:Product]. When I run that query, all is well, and it
> returns the first 10 rows. However, if I fetch more rows by adding, say
> =500, we get the error Parent query yields document which is not
> matched by parents filter, docID=XXX.
>
> When we first saw that error, we discovered our id field was not unique
> across document types, so we added the uuid field as mentioned above, 
which
> is. we also added in our schema.xml file, wiped the core, recreated it, 
and
> restarted Solr just to make sure it was in effect. We have double checked
> and are sure that the uuid fields are unique.
  

Re: Solr querying nested documents with ChildDocTransformerFactory, get “Parent query yields document which is not matched by parents filter”

2017-02-02 Thread Mikhail Khludnev
David,

Can you make sure your index doesn't have deleted docs? This  can be seen
in SolrAdmiun.
And can you merge index to avoid having them in the index?

On Thu, Feb 2, 2017 at 12:29 AM, David Kramer <david.kra...@shoebuy.com>
wrote:

>
>
> Some background:
> · The data involved is catalog data, with three nested objects:
> Products, Items, and Skus, in that order. We have a docType field on each
> record as a differentiator.
> · The "id" field in our data is unique within datatype, but not
> across datatypes. We added a "uuid" field in our program that generates the
> Solr import file that is the id prefixed by the first letter of the
> docType, like P12345. That makes the uuid field unique, and we have that as
> the uniqueKey in our schema.xml.
> · We are trying to retrieve the parent Product, and all children
> documents. As such, we are using the ChildDocTransformerFactory
> ([child...]) to retrieve the children along with the parent. We have not
> yet solved the problem of getting items within SKUs as nested documents in
> the results, and we will have to figure that out at some point, but for now
> we get them flattened
> · We are building out the proof of concept for this. This is all
> new work, so we are free to change a lot.
> · This is Solr 6.0.0, and we are importing in JSON format, if that
> matters
> · I submitted this question to StackOverflow<http://
> stackoverflow.com/questions/41969353/solr-querying-nested-documents-with-
> childdoctransformerfactory-get-parent-quer> but haven’t gotten any
> answers yet.
>
>
> Our data looks like this (I've removed some fields for simplicity):
>
> {
>
>   "id": 739063,
>
>   "docType": "Product",
>
>   "uuid": "P739063",
>
>   "_childDocuments_": [
>
> {
>
>   "id": 1537378,
>
>   "price": 25.45,
>
>   "color": "Blush",
>
>   "docType": "Item",
>
>   "productId": 739063,
>
>   "uuid": "I1537378",
>
>   "_childDocuments_": [
>
> {
>
>   "id": 12799578,
>
>   "size": "10",
>
>   "width": "W",
>
>   "docType": "Sku",
>
>       "itemId": 1537378,
>
>   "uuid": "S12799578"
>
> }
>
>   ]
>
> }
>
> }
>
>
>
> The query to fetch all Products and their children nested inside them is
> q=docType:Product=title,id,docType,[child
> parentFilter=docType:Product]. When I run that query, all is well, and it
> returns the first 10 rows. However, if I fetch more rows by adding, say
> =500, we get the error Parent query yields document which is not
> matched by parents filter, docID=XXX.
>
> When we first saw that error, we discovered our id field was not unique
> across document types, so we added the uuid field as mentioned above, which
> is. we also added in our schema.xml file, wiped the core, recreated it, and
> restarted Solr just to make sure it was in effect. We have double checked
> and are sure that the uuid fields are unique.
>
>
>
> In all the search results for that error that I've found, the OP did not
> have a field that could differentiate the different document types, but as
> you see we do. Since both the query and the parentFilter are searching for
> docType:Product I don't see how either could possibly return anything but
> parents. We've also tried adding childFilter=docType:Item and
> childFilter=docType:Sku but that did not help.  I also tried using title:*
> for the filter since only products have titles.
>
>
>
> Is there anything else we can try?
>
> Any explanation of this?
>
> Is it possible that it's not using uuid as the unique identifier even
> though it's specified in the schema.xml, and would that even cause this?
>
> Thanks.
>
>
>


-- 
Sincerely yours
Mikhail Khludnev


Solr querying nested documents with ChildDocTransformerFactory, get “Parent query yields document which is not matched by parents filter”

2017-02-01 Thread David Kramer


Some background:
· The data involved is catalog data, with three nested objects: 
Products, Items, and Skus, in that order. We have a docType field on each 
record as a differentiator.
· The "id" field in our data is unique within datatype, but not across 
datatypes. We added a "uuid" field in our program that generates the Solr 
import file that is the id prefixed by the first letter of the docType, like 
P12345. That makes the uuid field unique, and we have that as the uniqueKey in 
our schema.xml.
· We are trying to retrieve the parent Product, and all children 
documents. As such, we are using the ChildDocTransformerFactory ([child...]) to 
retrieve the children along with the parent. We have not yet solved the problem 
of getting items within SKUs as nested documents in the results, and we will 
have to figure that out at some point, but for now we get them flattened
· We are building out the proof of concept for this. This is all new 
work, so we are free to change a lot.
· This is Solr 6.0.0, and we are importing in JSON format, if that 
matters
· I submitted this question to 
StackOverflow<http://stackoverflow.com/questions/41969353/solr-querying-nested-documents-with-childdoctransformerfactory-get-parent-quer>
 but haven’t gotten any answers yet.


Our data looks like this (I've removed some fields for simplicity):

{

  "id": 739063,

  "docType": "Product",

  "uuid": "P739063",

  "_childDocuments_": [

{

  "id": 1537378,

  "price": 25.45,

  "color": "Blush",

  "docType": "Item",

  "productId": 739063,

  "uuid": "I1537378",

  "_childDocuments_": [

{

  "id": 12799578,

  "size": "10",

  "width": "W",

  "docType": "Sku",

  "itemId": 1537378,

  "uuid": "S12799578"

}

  ]

}

}



The query to fetch all Products and their children nested inside them is 
q=docType:Product=title,id,docType,[child parentFilter=docType:Product]. 
When I run that query, all is well, and it returns the first 10 rows. However, 
if I fetch more rows by adding, say =500, we get the error Parent query 
yields document which is not matched by parents filter, docID=XXX.

When we first saw that error, we discovered our id field was not unique across 
document types, so we added the uuid field as mentioned above, which is. we 
also added in our schema.xml file, wiped the core, recreated it, and restarted 
Solr just to make sure it was in effect. We have double checked and are sure 
that the uuid fields are unique.



In all the search results for that error that I've found, the OP did not have a 
field that could differentiate the different document types, but as you see we 
do. Since both the query and the parentFilter are searching for docType:Product 
I don't see how either could possibly return anything but parents. We've also 
tried adding childFilter=docType:Item and childFilter=docType:Sku but that did 
not help.  I also tried using title:* for the filter since only products have 
titles.



Is there anything else we can try?

Any explanation of this?

Is it possible that it's not using uuid as the unique identifier even though 
it's specified in the schema.xml, and would that even cause this?

Thanks.




Block join children query parser returns Parent query yields document which is not matched by parents filter

2015-08-12 Thread MOIS Martin (MORPHO)
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=CREATEname=nestedPersonnumShards=6collection.configName=mim
I have enrolled this documents to the collection: curl 
http://localhost:8983/solr/nestedPerson/update?commitWithin=3000 -d '
add
doc
   field name=id1/field
   field name=psPS1/field
   field name=deceasedfalse/field
   doc
   field name=id2/field
   field name=csCS1/field
   field 
name=firstNameMartin/field
   /doc
/doc
doc
   field name=id3/field
   field name=psPS2/field
   field name=deceasedtrue/field
   doc
   field name=id4/field
   field name=csCS2/field
   field name=firstNameStefan/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.
#


Re: Block join children query parser returns Parent query yields document which is not matched by parents filter

2015-08-12 Thread Mikhail Khludnev
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=CREATEname=nestedPersonnumShards=6collection.configName=mim
 I have enrolled this documents to the collection: curl
 http://localhost:8983/solr/nestedPerson/update?commitWithin=3000 -d '
 add
 doc
field name=id1/field
field name=psPS1/field
field name=deceasedfalse/field
doc
field name=id2/field
field name=csCS1/field
field
 name=firstNameMartin/field
/doc
 /doc
 doc
field name=id3/field
field name=psPS2/field
field name=deceasedtrue/field
doc
field name=id4/field
field name=csCS2/field
field
 name=firstNameStefan/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


Parent query yields document which is not matched by parents filter

2014-11-11 Thread ku3ia
Hi, folks!

We are using parent/child architecture in our project and sometimes when
using child transformer ([child]) there are an exception:

Parent query yields document which is not matched by parents filter,
docID=...

Examples of query are:
http://localhost/solr/core/select?fq=id:123456789fl=*q={!child
of=DocumentType:parent}Text:foo
http://localhost/solr/core/select?q=id:123456789fl=*,[child
parentFilter=DocumentType:parent]

Documents in index:
doc
  id123456789_0/id
  Textfoo/Text
doc
doc
  id123456789/id
  DocumentTypeparent/DocumentType
  ... other fields
/doc

Root field in schema.xml is present.

When I made an optimize to one segment sometimes error is dissapeared, but
sometimes not. Please advice how to fix it.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Parent-query-yields-document-which-is-not-matched-by-parents-filter-tp4168727.html
Sent from the Solr - User mailing list archive at Nabble.com.