Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 16DB6200BE3 for ; Thu, 22 Dec 2016 18:58:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 15842160B26; Thu, 22 Dec 2016 17:58:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5E2D9160B1B for ; Thu, 22 Dec 2016 18:58:06 +0100 (CET) Received: (qmail 68283 invoked by uid 500); 22 Dec 2016 17:58:05 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 68269 invoked by uid 99); 22 Dec 2016 17:58:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Dec 2016 17:58:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8E6111A047A for ; Thu, 22 Dec 2016 17:58:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.679 X-Spam-Level: * X-Spam-Status: No, score=1.679 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 7Ei2Y2Ueo8Xo for ; Thu, 22 Dec 2016 17:58:03 +0000 (UTC) Received: from mail-it0-f54.google.com (mail-it0-f54.google.com [209.85.214.54]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 4C91D5F47A for ; Thu, 22 Dec 2016 17:58:03 +0000 (UTC) Received: by mail-it0-f54.google.com with SMTP id 75so105023755ite.1 for ; Thu, 22 Dec 2016 09:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=JwII5TU/9GjjSjcXEhHzpju7e4j1k5pkgDUe/rSJ5yI=; b=oEn3q2CLlR8eI2WSS6Zj9XrVnq43tOG9h2hkrfCRx7Lu04j50y8RlSDCHpxob2JXaE ObP5+4gnhbWIa+53EIAVmTJ08yKN3pYZmy6TGAYH5iDPnP6bJoiykZgA4nZqPFAZx1S9 mzFYkwwEBB/ZFsAR2mQOb6+fnbTOeO7T4RcQGMMUBbEZULhmNDcpQYD+H/wRJtLguK5P leylCm9zUL7SINvdQz5rkpZKfetB6z3yWS3vDr7aw/Z2S6x4SIoxtJjlFK7GoGL4ql/d k9UNGqh6YkwnhgRLMMT0JfCK6Wk2v8jtUR8S2jZPCx3lb3A4JLnDgzkcQFq6LS45vnsJ eflw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=JwII5TU/9GjjSjcXEhHzpju7e4j1k5pkgDUe/rSJ5yI=; b=kZic+mK6GtUj7OJgbzzmZO2HlidzVOsgn5SKrEZuaJqH/+mYc0Qzy27CfNyNpNRajh iXXvgwSef951HCS1DwOaGyS9XtUt0hE+XU5Tt5T19r7a5Iq5KAQ5/PdGrU3MQXgBdTPQ 0ekq5eR8FU4gAJfay0mnzk2lgvxD/gMsha8hbpQlMrvbKRoNlolPffxYEv5RSOXaE42V sIpsDq7cPOlrfsHSuvM+5EJCS5RzAldSTJaMosMuw4LLzvxmR0hBHPFCGb3mhC95wcae 8n9HfjZNOMhUyGpL+VWAx1PGVbfR3vAF9veWsK0w4d1ettNXKnwpYHWzqZKo69hhJJCa cimg== X-Gm-Message-State: AIkVDXJwTvlIwIOgz20PJTmC+8GeMmiVphsP+YLhI57q1qkfBJF+ljXjRsdX/yVqodeXOHHD7aHoUwTnHDYbkg== X-Received: by 10.36.66.76 with SMTP id i73mr10916898itb.50.1482429482616; Thu, 22 Dec 2016 09:58:02 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Adrien Grand Date: Thu, 22 Dec 2016 17:57:52 +0000 Message-ID: Subject: Re: Sorting, Range Query, faceting - NumericDocValuesField Vs LongField To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001a114049a6b75e8305444302b7 archived-at: Thu, 22 Dec 2016 17:58:07 -0000 --001a114049a6b75e8305444302b7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le jeu. 22 d=C3=A9c. 2016 =C3=A0 18:50, Kumaran Ramasubramanian a =C3=A9crit : > I want to provide sorting, range search and faceting in numeric fields. > > AFAIK, Purpose of different numeric field types are, > > NumericDocValuesField supports sorting and faceting > LongField/IntField supports range query and sorting > LongField/IntField only support querying, NumericDocValuesField is the one that supports sorting. Also note that as of 6.0 LongField and IntField have been replaced with LongPoint and IntPoint. > 1. Should i duplicate one field in above mentioned types to achieve all t= he > three features in numeric? > Yes. By the way it is perfectly fine to use the same field name for the point field and the doc values field. > 2. If i am ready to sacrifice faceting, is it advisable to use LongField > for sorting and range query? > Like said above you need doc values for sorting. > 3. During sorting, Will NumericDocValuesField( column stride storage) > perform better than LongField(trie structure)? If so , should i duplicate > field in both 1 and 2 cases? > Same note here. Adrien --001a114049a6b75e8305444302b7--