Thanks for your reply Alexandre and Mikhail. If you are indexing the parent/child as a block, then you know number of children when you are indexing parent and can store that as a field. That would be most efficient.
- I can achieve that when I do my re-indexing. When searching for children you can assign ^=1 per every hit, then you can aggregate these hits with {!parent ... score=total}, then you can cut off parents exceeding number of child limit with {!frange}. - Just to check, is this done during query time? Regards, Edwin On 30 August 2016 at 14:51, Mikhail Khludnev <m...@apache.org> wrote: > Hello, > When searching for children you can assign ^=1 per every hit, then > you can aggregate these hits with {!parent ... score=total}, then > you can cut off parents exceeding number of child limit with {!frange}. > > > On Tue, Aug 30, 2016 at 5:38 AM, Zheng Lin Edwin Yeo <edwinye...@gmail.com > > > wrote: > > > Hi, > > > > Would like to check, in the parent/child nested document, is it possible > to > > return only records with a certain number of child? > > For example, I want to return all the parent's records which has more > than > > 100 child. > > Is it possible to be done? > > > > I'm using Solr 6.1.0 > > > > Regards, > > Edwin > > > > > > -- > Sincerely yours > Mikhail Khludnev >