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 804B9109B6 for ; Fri, 23 May 2014 06:22:39 +0000 (UTC) Received: (qmail 51296 invoked by uid 500); 23 May 2014 06:22:36 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 51221 invoked by uid 500); 23 May 2014 06:22:36 -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 51213 invoked by uid 99); 23 May 2014 06:22:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 May 2014 06:22:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.216.178] (HELO mail-qc0-f178.google.com) (209.85.216.178) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 May 2014 06:22:30 +0000 Received: by mail-qc0-f178.google.com with SMTP id l6so7317278qcy.37 for ; Thu, 22 May 2014 23:22:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=kY8P6SytTb+2lKcxKnBR2OTYy4b1kE5Pt4XB6PXWCsI=; b=Z1ftJzz+CvVcTErG1NOGo0TgzuzA9EvjH9O1gRJGBVeTdGzSFtI90rPrG1CGqrMN1C eQP/L3YDCq26seV7TM6Sjig4g/h/EuKTtEn9mizCdS5SoNZgDEvIXp2nLEFGmKBegZrR OdEE9HTLWj2ILnFHA0Q348t6/1ZMxM5fVtdaVB9fne7uBdoRIGHUhoVARJG0kXC2iW5Z WP5KPnSqHBKjp6HnUiiumWKOIbj5YL9xYSW7N91O1XcnwCqK5/VYK958FBlHarrMuMDk VyFjnrtjST7busxTaHwGyHcGHXbtyfS4H+PDKIB1NiYlqVgjp/I2btdrDoFWn8ubgVNp M0hw== X-Gm-Message-State: ALoCoQlByR1w8esiHeGc06KP8DBpeh312ipwYJid3LEEmtSRZKgfyU0cS1briMg6F/1HtKTCUYBO MIME-Version: 1.0 X-Received: by 10.224.172.2 with SMTP id j2mr3227069qaz.83.1400826130097; Thu, 22 May 2014 23:22:10 -0700 (PDT) Received: by 10.140.48.18 with HTTP; Thu, 22 May 2014 23:22:10 -0700 (PDT) X-Originating-IP: [89.243.114.66] In-Reply-To: References: Date: Fri, 23 May 2014 07:22:10 +0100 Message-ID: Subject: Re: IF function and FieldList From: Arcadius Ahouansou To: solr-user Content-Type: multipart/alternative; boundary=001a11c2b73ee07c1c04fa0b3f4a X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2b73ee07c1c04fa0b3f4a Content-Type: text/plain; charset=UTF-8 Thanks Erick. Arcadius. On 22 May 2014 22:14, Erick Erickson wrote: > Why not just return them all and sort it out on the app layer? Seems > easier.... > > Or consider doc transformers I suppose. > > Best, > Erick > > On Thu, May 22, 2014 at 10:20 AM, Arcadius Ahouansou > wrote: > > Hello. > > > > I need to have dynamically assigned field list (fl) depending on the > > existence of a field in the response. > > I need to do something like > > > > fl=if(exists(field0),field0 field1,field2 field3)) > > > > The problem is that the "if" function does not like the space. > > I have tried many combinations like double or quotes around the field > list: > > fl=if(exists(field0),'field0 field1','field2 field3')) > > or > > fl=if(exists(field0),"field0,field1","field2,field3")) > > > > or parenthesis etc. > > > > Any help would be very appreciated. > > > > Thanks. > > > > Arcadius. > --001a11c2b73ee07c1c04fa0b3f4a--