Solr to get latest version of documents

Viewed 38

I have a docs as follows:

{docid:1,version:1}
{docid:1,version:2}
{docid:2,version:1}
{docid:2,version:2}
{docid:2,version:3}
{docid:3,version:1}
{docid:3,version:2}

I need to get all the docs which are of latest version per each docid.

o/p

{docid:1,version:2}
{docid:2,version:3}
{docid:3,version:2}

Can give some hints on it how to do it.

0 Answers
Related