Hi,
childFilter is guaranteed to return the documents in the order it was
provided to Solr.

If you want to sort or do other interesting things, consider [subQuery]

~ David Smiley
Apache Lucene/Solr Search Developer
http://www.linkedin.com/in/davidwsmiley


On Thu, Apr 29, 2021 at 3:55 PM Roopa Rao <roop...@gmail.com> wrote:

> Hi -
> I am on version Solr 6.6 and using parent and child construct
>
> Query as follows:
>  [child parentFilter='field1:value1' childFilter='((field1:(value1)) AND
> ({!terms f=field2}value2))' limit=1]
>
> Here I want to sort this children by field3 and return only the top 1
> element (hence limit=1) . Is there a way to do this?
>
> I notice that when the children are returned, it is being returned in the
> order it was indexed. Is this guaranteed?
> If it is going to return the order in which is indexed that will work in my
> case too, as I index the field3 data in the order which it should be shown.
>
> Thanks,
> Roopa
>

Reply via email to