I am doing collapse on itemId like - {!collapse field=itemId nullPolicy=expand}
. Its working as expected . So when it is doing the collpase it is showing me one result for itemID -123 that is fine , but in my dataset I have a field called defaultItemID which can be Y or N , and there will be only one defaultItemID:Y per itemID
Example - if I have a itemID - 123, and there are 20 results for itemID- 123 ,and out of those 20 records there will be only one item whose defaultItemID will be Y)
I want solr to return the the record where defaultItemID is Y , when doing the collapse , Is there anyway I can modify my collapse to do that . I tried sort but it was sorting the resut which were coming on exapanded.