Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BCE1910C42 for ; Fri, 3 Jan 2014 23:59:19 +0000 (UTC) Received: (qmail 54595 invoked by uid 500); 3 Jan 2014 23:59:16 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 54479 invoked by uid 500); 3 Jan 2014 23:59:15 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 54471 invoked by uid 99); 3 Jan 2014 23:59:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jan 2014 23:59:15 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of SRS0=oTG3ou=WJ=basetechnology.com=jack@yourhostingaccount.com designates 65.254.253.25 as permitted sender) Received: from [65.254.253.25] (HELO mailout03.yourhostingaccount.com) (65.254.253.25) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jan 2014 23:59:09 +0000 Received: from mailscan12.yourhostingaccount.com ([10.1.15.12] helo=mailscan12.yourhostingaccount.com) by mailout03.yourhostingaccount.com with esmtp (Exim) id 1VzEdc-0006qB-FE for solr-user@lucene.apache.org; Fri, 03 Jan 2014 18:58:48 -0500 Received: from impout02.yourhostingaccount.com ([10.1.55.2] helo=impout02.yourhostingaccount.com) by mailscan12.yourhostingaccount.com with esmtp (Exim) id 1VzEdc-00042F-Fh for solr-user@lucene.apache.org; Fri, 03 Jan 2014 18:58:48 -0500 Received: from authsmtp09.yourhostingaccount.com ([10.1.18.9]) by impout02.yourhostingaccount.com with NO UCE id 9byo1n0010BkWne01byomn; Fri, 03 Jan 2014 18:58:48 -0500 X-Authority-Analysis: v=2.0 cv=Y4J6Q2iN c=1 sm=1 a=UdCbmyego4VUa/xJBgcoFg==:17 a=aQzbgH187woA:10 a=roZ-5GAT6esA:10 a=3jZET7lWBKwA:10 a=8nJEP1OIZ-IA:10 a=jvYhGVW7AAAA:8 a=MCtgq9q5rhAA:10 a=mV9VRH-2AAAA:8 a=A-GbxyYA__Q9eqCq3_EA:9 a=wPNLvfGTeEIA:10 a=6Nsp9XPxgQEopsMv/m97rg==:117 X-EN-OrigOutIP: 10.1.18.9 X-EN-IMPSID: 9byo1n0010BkWne01byomn Received: from 207-237-114-232.c3-0.nyr-ubr1.nyr.ny.cable.rcn.com ([207.237.114.232]:53357 helo=JackKrupansky) by authsmtp09.yourhostingaccount.com with esmtpa (Exim) id 1VzEdb-0002Yu-St for solr-user@lucene.apache.org; Fri, 03 Jan 2014 18:58:47 -0500 Message-ID: <6656CAD1C8064A1582101DD6C60D8428@JackKrupansky> From: "Jack Krupansky" To: References: <1388789896.22622.66347481.6CB8A711@webmail.messagingengine.com> In-Reply-To: <1388789896.22622.66347481.6CB8A711@webmail.messagingengine.com> Subject: Re: how to include result ordinal in response Date: Fri, 3 Jan 2014 18:58:42 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3555.308 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308 X-EN-UserInfo: e0a4b55451ed9f27313ebf02e3d4348d:931c98230c6409dcc37fa7e93b490c27 X-EN-AuthUser: jack@basetechnology.com Sender: "Jack Krupansky" X-EN-OrigIP: 207.237.114.232 X-EN-OrigHost: 207-237-114-232.c3-0.nyr-ubr1.nyr.ny.cable.rcn.com X-Virus-Checked: Checked by ClamAV on apache.org Or just use the internal document ID: fl=*,[docid] Granted, the docID may change if a segment merge occurs and earlier documents have been deleted, but it may be sufficient for your purposes. -- Jack Krupansky -----Original Message----- From: Upayavira Sent: Friday, January 03, 2014 5:58 PM To: solr-user@lucene.apache.org Subject: Re: how to include result ordinal in response 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