Querying Nested documents

2015-07-13 Thread Ramesh Nuthalapati
(Duplicate post as the xml is not formatted well in nabble, so posting
directly to the list)

Hi, I have question regarding nested documents.

My document looks like below,

 
1234
xger


0
0
   2015-06-15T13:29:07Z
ege
Duper
http://www.domain.com
zoome
parent

1234-images
http://somedomain.com/some.jpg
1:1


1234-platform-ios
ios
https://somedomain.com
somelink
false
2015-03-23T10:58:00Z
-12-30T19:00:00Z


1234-platform-android

android
somedomain.com
somelink
false
2015-03-23T10:58:00Z
-12-30T19:00:00Z



Right now I can query like this

http://localhost:8983/solr/demo/select?q=
{!parent%20which=%27type:parent%27}&fl=*,[child%20parentFilter=type:parent%20childFilter=image_uri_s:*]&indent=true

and get the parent and child document with matching criteria (just parent
and image child document).

*But, I want to get all other children* (1234-platform-ios and
1234-platform-andriod) even if i query based on image_uri_s (1234-images)
although they are other children which are part of the parent document.

Is it possible ?

Appreciate your help !

Thanks,
Ramesh


Re: Querying Nested documents

2015-07-14 Thread Ramesh Nuthalapati
Yes you are right.

So the query you are saying should be like below .. or did I misunderstood
it

http://localhost:8983/solr/demo/select?q= {!parent
which='type:parent'}&fl=*,[child parentFilter=type:parent
childFilter=(image_uri_s:somevalue) OR (-image_uri_s:*)]&indent=true

If so, I am getting an error with parsing field name.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Querying-Nested-documents-tp4217169p4217348.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Querying Nested documents

2015-07-15 Thread Ramesh Nuthalapati
Mikhail - 

This worked great.

http://localhost:8983/solr/demo/select?q={!parent 
which='type:parent'}image_uri_s:somevalue&fl=*,[child 
parentFilter=type:parent 
childFilter=-type:parent]&indent=true 

Thank you.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Querying-Nested-documents-tp4217169p4217534.html
Sent from the Solr - User mailing list archive at Nabble.com.