lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@odoko.co.uk>
Subject Re: how to include result ordinal in response
Date Fri, 03 Jan 2014 22:58:16 GMT
On Fri, Jan 3, 2014, at 10:00 PM, Peter Keegan wrote:
> Is there a simple way to output the result number (ordinal) with each
> returned document using the 'fl' parameter? This would be useful when
> visually comparing the results from 2 queries.

I'm not aware of a simple way.

If you're competent in Java, this could be a neat new DocTransformer
component. You'd say:

fl=*,[position]

and you'd get a new field in your search results.

Cruder ways would be to use XSLT to add it to an XML output, or a
velocity template, but the DocTransformer approach would create
something that could be of ongoing use.

Upayavira

Mime
View raw message