lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petersen, Robert (Contr)" <robert.peters...@ftr.com>
Subject Re: Can someone help? Two level nested doc... ChildDocTransformerFactory sytax...
Date Tue, 07 Nov 2017 16:36:53 GMT
OK although this was talked about as possibly coming in solr 6.x I guess it was hearsay and
from what I can tell after rereading everythying I can find on the subject as of now the child
docs are only retrievable as a one level hierarchy when using the ChildDocTransformerFactory



________________________________
From: Petersen, Robert (Contr) <robert.petersen1@ftr.com>
Sent: Monday, November 6, 2017 5:05:31 PM
To: solr-user@lucene.apache.org
Subject: Can someone help? Two level nested doc... ChildDocTransformerFactory sytax...

OK no faceting, no filtering, I just want the hierarchy to come backin the results. Can't
quite get it... googled all over the place too.


Doc:

{ id : asdf, type_s:customer, firstName_s:Manny, lastName_s:Acevedo, address_s:"123 Fourth
Street", city_s:Gotham, tn_s:1234561234,
  _childDocuments_:[
  { id : adsf_c1,
    src_s : "CRM.Customer",
type_s:customerSource,
_childDocuments_:[
                {
id : asdf_c1_c1,
type_s:customerSourceType,
                    "key_s": "id",
                    "value_s": "GUID"
                }
            ]
},
  { id : adsf_c2,
    "src_s": "DPI.SalesOrder",
type_s:customerSource,
_childDocuments_:[
                {
id : asdf_c2_c1,
type_s:customerSourceType,
                    "key_s": "btn",
                    "value_s": "4052328908"
                },
                {
id : asdf_c2_c2,
type_s:customerSourceType,
"key_s": "seq",
                    "value_s": "5"
               },
                {
id : asdf_c2_c3,
type_s:customerSourceType,
                    "key_s": "env",
                    "value_s": "MS"
                }
            ]
}
]
}


Queries:

Gives all nested docs regardless of level as a flat set
http://localhost:8983/solr/temptest/select?q=id:asdf&fl=id,[child%20parentFilter=type_s:customer]

Gives all nested child docs only
http://localhost:8983/solr/temptest/select?q=id:asdf&fl=id,[child%20parentFilter=type_s:customer%20childFilter=type_s:customerSource]

How to get nested grandchild docs at correct level?
Nope exception:
http://localhost:8983/solr/temptest/select?q=id:asdf&fl=id,[child%20parentFilter=type_s:customer%20childFilter=type_s:customerSource],[child%20parentFilter=type_s:customerSource%20childFilter=type_s:customerSourceType]

Nope exception:
http://localhost:8983/solr/temptest/select?q=id:asdf&fl=id,[child%20parentFilter=type_s:customer%20childFilter=type_s:customerSource],[child%20parentFilter=type_s:customerSource]


Nope but no exception only gets children again tho like above:
http://localhost:8983/solr/temptest/select?q=id:asdf&fl=id,[child%20parentFilter=type_s:customer%20childFilter=type_s:customerSource],[child%20parentFilter=type_s:customer*]

Nope but no exception only gets children again:<http://localhost:8983/solr/temptest/select?q=id:asdf&fl=id,[child%20parentFilter=type_s:customer%20childFilter=type_s:customerSource],[child%20parentFilter=type_s:customer*%20childFilter=type_s:customerSourceType]>

http://localhost:8983/solr/temptest/select?q=id:asdf&fl=id,[child%20parentFilter=type_s:customer%20childFilter=type_s:customerSource],[child%20parentFilter=type_s:customer*%20childFilter=type_s:customerSourceType]


Nope same again... no grandchildren:

http://localhost:8983/solr/temptest/select?q=id:asdf&fl=id,p:[child%20parentFilter=type_s:customer%20childFilter=type_s:customerSource],q:[child%20parentFilter=-type_s:customer%20parentFilter=type_s:customerSource%20childFilter=type_s:customerSourceType]


Gives all but flat no child to grandchild hierarchy:

http://localhost:8983/solr/temptest/select?q=id:asdf&fl=id,p:[child%20parentFilter=type_s:customer%20childFilter=type_s:customerSource],q:[child%20parentFilter=type_s:customer%20childFilter=type_s:customerSourceType]


Thanks in advance,

Robi

________________________________

This communication is confidential. Frontier only sends and receives email on the basis of
the terms set out at http://www.frontier.com/email_disclaimer.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message