Aurélien is correct, for the exact behavior you're looking
for you'd need to run w queries.

But you might be able to make do with field collapsing.
You'd probably have to copyField from title to
title_grouping which would be un-analyzed (string type
or KeywordTokenizer), then group on _that_ field.
You'd get back the top N matches grouped by title and
your app could display that info however it made sense.

"Grouping" sometimes goes by "field collapsing" FWIW.
Erick

On Sun, Aug 17, 2014 at 2:16 PM, talt <mikaelsaltz...@gmail.com> wrote:
> I have a field in my SOLR index, let's call it book_title.
>
> A query returns 15 rows with book_title:"The Kite Runner", 13 rows with
> book_title:"The Stranger", and 8 rows with book_title:"The Ruby Way".
>
> Is there a way to return only the first row of "The Kite Runner" and "The
> Stranger", but all of the "The Ruby Way" rows from the previous query
> result? This would result in 10 rows altogether. Is this possible at all,
> using a single query?
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Selectively-setting-the-number-of-returned-SOLR-rows-per-field-based-on-field-value-tp4153441.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to