I want to set a criteria for solr query in spring application. Is there any way to prioritize my criteria first and then bring remaining records in regular order? I have tried using:
filterQuery.addCriteria(new Criteria("type").is("abc"));
query.addFilterQuery(filterQuery);
query.setRows(10); // records limit
return query;
Now if there are 5 matching records where type is abc, the solr will return me just these 5 records. But what I want is to fill the limit which is 10 and get the remaining records accordingly with out any criteria being set. So that I have 5 records according to the criteria and remaining records in a regular order.
I know this can not be possible with is method of the criteria. Is there any method which could help me with my scenario?