Thanks, I Figured it out based on your last response, I  mistakenly
UUencoded the wt=json and indent = true when i  manufacturing the request.


%26wt%3djson%26indent%3dtrue

Incidentally, this translates to
{!parent
which="content_type:parentDocument"}ATTRIBUTES.STATE:TX&wt=json&indent=true

and returns an xml response (malformed)

For your correct request (expressed as xml), the query looks like this

{!parent which="content_type:parentDocument"}ATTRIBUTES.STATE:TX


In any case, I'll write up a practical HOW TO using SOLRJ for the benefit
of the community.




On Tue, Jun 24, 2014 at 2:29 PM, Mikhail Khludnev <
mkhlud...@griddynamics.com> wrote:

> I wonder what can be wrong there.. it works for me absolutely fine
>
> proofpic
> http://postimg.org/image/51qrsm48p/
>
> query
>
> http://localhost:8983/solr/collection1/select?q=%7B!parent+which%3D%22content_type%3AparentDocument%22%7DATTRIBUTES.STATE%3ATX&wt=json&indent=true&debugQuery=true
>
> gives
>
>
> "response":{"numFound":1,"start":0,"docs":[
>       {
>         "id":"1",
>         "content_type":["parentDocument"],
>         "_version_":1471814208097091584}]
>   },
>
> I just can wish you good luck, I can't help. Two minor notes:
>
> I declared the field explicitly in schema.xml  it might help to you if
> you didn't it yet.. I r'lly dunno
>
>    <field name="ATTRIBUTES.STATE" type="string" indexed="true"
> stored="true" required="false" multiValued="true" />
>
> Just a hint to debug block join is using wt=csv that shows the block
> alignment pretty well.
>
>
>
> On Tue, Jun 24, 2014 at 10:38 PM, Vinay B, <vybe3...@gmail.com> wrote:
>
> > Michael, try this,
> >
> > Thanks
> >
> > https://www.dropbox.com/s/074p0wpjz916d78/test_core.tar.gz
> >
> >
> >
> > On Tue, Jun 24, 2014 at 1:16 PM, Mikhail Khludnev <
> > mkhlud...@griddynamics.com> wrote:
> >
> > > Vinay,
> > > pls upload your index dir somewhere, I can try to check what's wrong
> with
> > > it.
> > >
> > >
> > > On Tue, Jun 24, 2014 at 9:43 PM, Vinay B, <vybe3...@gmail.com> wrote:
> > >
> > > > Hi,
> > > > Yes, the query ATTRIBUTES.STATE:TX returns the child doc (see
> response
> > > > below) . Is there something else that I'm missing to link the parent
> > and
> > > > the child? I followed your advice from my last thread and used a
> block
> > > join
> > > > in this attempt, but still don't see how the parent and child realize
> > > their
> > > > association. We're using solr 4.8.1
> > > >
> > > > Thanks
> > > >
> > > > Query Response
> > > >
> > > > {
> > > >   "responseHeader":{
> > > >     "status":0,
> > > >     "QTime":0,
> > > >     "params":{
> > > >       "indent":"true",
> > > >       "q":"ATTRIBUTES.STATE:TX",
> > > >       "wt":"json"}},
> > > >   "response":{"numFound":1,"start":0,"docs":[
> > > >       {
> > > >         "id":"1-A",
> > > >         "ATTRIBUTES.STATE":["LA",
> > > >           "TX"]}]
> > > >   }}
> > > >
> > > >
> > > > Raw doc dump
> > > >
> > > > {
> > > >   "responseHeader":{
> > > >     "status":0,
> > > >     "QTime":0,
> > > >     "params":{
> > > >       "indent":"true",
> > > >       "q":"*:*",
> > > >       "wt":"json"}},
> > > >   "response":{"numFound":2,"start":0,"docs":[
> > > >       {
> > > >         "id":"1-A",
> > > >         "ATTRIBUTES.STATE":["LA",
> > > >           "TX"]},
> > > >       {
> > > >         "id":"1",
> > > >         "content_type":"parentDocument",
> > > >         "_version_":1471814208097091584}]
> > > >   }}
> > > >
> > > >
> > > >
> > > > On Tue, Jun 24, 2014 at 10:45 AM, Mikhail Khludnev <
> > > > mkhlud...@griddynamics.com> wrote:
> > > >
> > > > > did you run the underneath query ATTRIBUTES.
> > > > > STATE:TX. does it return anything?
> > > > >
> > > > >
> > > > > On Tue, Jun 24, 2014 at 6:59 PM, Vinay B, <vybe3...@gmail.com>
> > wrote:
> > > > >
> > > > > > Okay, Let me try again.
> > > > > >
> > > > > > 1. Here is some sample SolrJ code that creates a parent and child
> > > > > document
> > > > > > (I hope)
> > > > > > https://gist.github.com/anonymous/d03747661ef03923de74
> > > > > >
> > > > > > 2. I tried a block join query which didn't return any results (I
> > > tried
> > > > > the
> > > > > > "Block Join Parent Query Parser" approach described in this link
> > > > > > https://cwiki.apache.org/confluence/display/solr/Other+Parsers).
> I
> > > > > > expected
> > > > > > to get back the parent doc of a child which has
> > ATTRIBUTES.STATE:TX,
> > > > > which
> > > > > > I did not , That is what I'm trying to figure out.
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > http://localhost:8088/solr/test_core/select?q={!parent
> > > > > >
> > > > >
> > > >
> > >
> >
> which="content_type:parentDocument"}ATTRIBUTES.STATE:TX&wt=json&indent=true
> > > > > >
> > > > > > (
> > > > > > equivalent to
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8088/solr/test_core/select?q=%7b!parent+which%3d%22content_type%3aparentDocument%22%7dATTRIBUTES.STATE%3aTX%26wt%3djson%26indent%3dtrue
> > > > > > )
> > > > > >
> > > > > > Resulting in
> > > > > > <response>
> > > > > > <lst name="responseHeader">
> > > > > > <int name="status">0</int>
> > > > > > <int name="QTime">1</int>
> > > > > > <lst name="params">
> > > > > > <str name="q">
> > > > > > {!parent
> > > > > >
> > > > >
> > > >
> > >
> >
> which="content_type:parentDocument"}ATTRIBUTES.STATE:TX&wt=json&indent=true
> > > > > > </str>
> > > > > > </lst>
> > > > > > </lst>
> > > > > > <result name="response" numFound="0" start="0"/>
> > > > > > </response>
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Mon, Jun 23, 2014 at 4:04 PM, Erick Erickson <
> > > > erickerick...@gmail.com
> > > > > >
> > > > > > wrote:
> > > > > >
> > > > > > > Well, what  do you mean by "not working"? You might review:
> > > > > > > http://wiki.apache.org/solr/UsingMailingLists
> > > > > > >
> > > > > > > Best,
> > > > > > > Erick
> > > > > > >
> > > > > > > On Mon, Jun 23, 2014 at 12:20 PM, Vinay B, <vybe3...@gmail.com
> >
> > > > wrote:
> > > > > > > > Hi,
> > > > > > > > I've been trying to experiment with block joins and parent /
> > > child
> > > > > docs
> > > > > > > as
> > > > > > > > described in this thread (input described in my first post of
> > the
> > > > > > thread,
> > > > > > > > .. and block join in my second post, as per the suggestions
> > > given).
> > > > > > What
> > > > > > > > else am I missing?
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://lucene.472066.n3.nabble.com/Why-aren-t-my-nested-documents-nesting-tt4142702.html#none
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Sincerely yours
> > > > > Mikhail Khludnev
> > > > > Principal Engineer,
> > > > > Grid Dynamics
> > > > >
> > > > > <http://www.griddynamics.com>
> > > > >  <mkhlud...@griddynamics.com>
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Sincerely yours
> > > Mikhail Khludnev
> > > Principal Engineer,
> > > Grid Dynamics
> > >
> > > <http://www.griddynamics.com>
> > >  <mkhlud...@griddynamics.com>
> > >
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
>  <mkhlud...@griddynamics.com>
>

Reply via email to