Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A4D40D7B6 for ; Fri, 16 Nov 2012 15:48:36 +0000 (UTC) Received: (qmail 29114 invoked by uid 500); 16 Nov 2012 15:48:35 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 28936 invoked by uid 500); 16 Nov 2012 15:48:35 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 28912 invoked by uid 99); 16 Nov 2012 15:48:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2012 15:48:34 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yseeley@gmail.com designates 209.85.219.48 as permitted sender) Received: from [209.85.219.48] (HELO mail-oa0-f48.google.com) (209.85.219.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2012 15:48:29 +0000 Received: by mail-oa0-f48.google.com with SMTP id h2so3276743oag.35 for ; Fri, 16 Nov 2012 07:48:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=vUcMJNKev74ldH9gMA2XSW0Qu0TQ8xmUMF6Vxyo2rqQ=; b=x7Q2PvCaHsv+72t9Q1VfSASFzn15Fz8RmuJsS9ZseiaGWDVnYc2L30RE6yEIEU9iSs y4k5RPGJIveRMXhyIFhsPc7u5XOLJ14nbKGRbUOrP43Xuoj8WqtBNEv/fnPF8SGYvQ+4 g4tjSW0KYGeEIynTDTUoOHWejyGDGEotU6dGbPcy5u81/JqAgItaHwwpvG9Ycdve1wVD mbStKnEMm63yA8woisicE7t19x67kNY/aF9T61eA0aknxuClcFyZUzwJB69EnGwWY9eg ecxSd1MWW2DeiMcKHMNLaT6llWD6J/VSaS9McIh+Os/wGu/tmn2yQuaeOXKE36eA7u3R fzPg== MIME-Version: 1.0 Received: by 10.182.235.46 with SMTP id uj14mr4092544obc.40.1353080888846; Fri, 16 Nov 2012 07:48:08 -0800 (PST) Sender: yseeley@gmail.com Received: by 10.60.171.4 with HTTP; Fri, 16 Nov 2012 07:48:08 -0800 (PST) In-Reply-To: <1352878868.3213.113.camel@te-prime> References: <1352878868.3213.113.camel@te-prime> Date: Fri, 16 Nov 2012 16:48:08 +0100 X-Google-Sender-Auth: 2GxPFT55Aib0ltazIDTyQVayLqU Message-ID: Subject: Re: Optimize facets when actually single valued? From: Yonik Seeley To: dev@lucene.apache.org, te@statsbiblioteket.dk Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Nov 14, 2012 at 8:41 AM, Toke Eskildsen wrote: > Dynamically changing response formats sounds horrible. It depends if you consider it a change of format. A single value would always be presented as a single value, while multiple values would always be represented as an array. It's on a per-document basis, and is not determined by whether the field as a whole is "multiValued". To users of JSON, I think it's pretty natural: [ { "id":"doc1", "author" : "David" }, { "id":"doc2", "author" : ["Mike","Erik"] } ] One could think of it in reverse too (that the current way of doing things is actually more prone to changing formats just because you changed a type). Say you indexed an author field as multiValued=false, but then realized you needed to sometimes add multiple values... now everything that had been coming back as "author":"David" starts coming back as "author":["David"] Ryan wrote: > If the only motivation for adding 'multiValued=flexible' is the response format, what about just changing the response format version number That's a good point. It doesn't seem particularly valuable to enable/disable this on a per-field basis, and one could see wanting to concurrently support different clients that want their results different ways. That really argues for a request parameter (or version) to control how multiValued fields are handled. -Yonik http://lucidworks.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org