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 6CDBF1931D for ; Tue, 5 Apr 2016 21:43:49 +0000 (UTC) Received: (qmail 7362 invoked by uid 500); 5 Apr 2016 21:43:46 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 7289 invoked by uid 500); 5 Apr 2016 21:43:46 -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 7277 invoked by uid 99); 5 Apr 2016 21:43:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2016 21:43:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 70AF5C0227 for ; Tue, 5 Apr 2016 21:43:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.429 X-Spam-Level: * X-Spam-Status: No, score=1.429 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 0z3dHWV8szG0 for ; Tue, 5 Apr 2016 21:43:43 +0000 (UTC) Received: from mail-ig0-f174.google.com (mail-ig0-f174.google.com [209.85.213.174]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id DD13F5FAC9 for ; Tue, 5 Apr 2016 21:43:42 +0000 (UTC) Received: by mail-ig0-f174.google.com with SMTP id gy3so64941659igb.0 for ; Tue, 05 Apr 2016 14:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=lv5t6rTbzbNWZhkMNYy4d/pBMnnF+fdy+CjqJuZo2U8=; b=aYVU1SoFWCaPn5HcokXRYWYziAJosVHmiIwUcmW/Da7iOvr1U9sAXpIlrwFEnVZ5U2 DKtKlf9tCWUqwwf3gCgYiuS6gFaCYwlo/qGzhW86JEbCotb0e8HqDFyHEZzbtiDDyy2N GLsF1UoD7yVJ4L9jtSrcYpXbn7uke/ocy8K7IXhQlknpWQnIAWcEMA68HZLGDbKsoS8M I26gjqVIQiit7VOntoD4IDGbhl4OYpnrILufZ3/vmzcQjmzJvS/qYTqun8Skj+XaI8gS GGDf2PWF2sYKrvLEm/nm3h6j15i09PzjSFI9j66j5pTVIthtlDVkAnVEATwuyjIQeYQe ibqQ== 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; bh=lv5t6rTbzbNWZhkMNYy4d/pBMnnF+fdy+CjqJuZo2U8=; b=faS7EHZtVeDpIxtdZ9tgeFTAPeBhVp27hWRCt3d+gLI7ChTywFSRZ+RZwGZ64QUZCr FC6Ln2Q3uYlknredKLl7q0wVjv0um86DKRAD2nIO17wr/w4PgVI35JPI/RvBi+d3oPzn V2WcecMX5d51EYPspemaMfy2sAd5me0eutVTb5YJv9cQ8aQ2fVWy28tvS92iTHj5maaX 6FX9jonUG997uzhBkSgFdKvlc9/3cpQqGvVf4A+fTsY8voPP1ao/ITLD09jYpLFgJRM8 x3xfIo0QUHwteh/XXISEUHGeC3D/+hXbsxheIDVRHNBxpVitNVVJ6MOxcOuF2kmmSCra mh2A== X-Gm-Message-State: AD7BkJLUMLBjpo9sZlAogFL5IZDNnFLsshRcHoU7OWZq6W4HMilHKDnSuHuEPQTPcduKLyayrSZBzQ7jfcGU+Q== MIME-Version: 1.0 X-Received: by 10.50.36.36 with SMTP id n4mr17780997igj.67.1459892621411; Tue, 05 Apr 2016 14:43:41 -0700 (PDT) Received: by 10.107.131.93 with HTTP; Tue, 5 Apr 2016 14:43:41 -0700 (PDT) In-Reply-To: References: Date: Tue, 5 Apr 2016 17:43:41 -0400 Message-ID: Subject: Re: Sort order for *:* query From: Steven White To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=089e013c69d41c0d02052fc3bd5f --089e013c69d41c0d02052fc3bd5f Content-Type: text/plain; charset=UTF-8 This is all good stuff. Thank you all for your insight. Steve On Mon, Apr 4, 2016 at 6:15 PM, Yonik Seeley wrote: > On Mon, Apr 4, 2016 at 6:06 PM, Chris Hostetter > wrote: > > : > > : Not sure I understand... _version_ is time based and hence will give > > : roughly the same accuracy as something like > > : TimestampUpdateProcessorFactory that you recommend below. Both > > > > Hmmm... last time i looked, i thought _version_ numbers were allocated & > > incremented on a per-shard basis and "time" was only used for initial > > seeding when the leader started up > > No, time is used for every version generated. Upper bits are > milliseconds and lower bits are incremented only if needed for > uniqueness in the shard (i.e. two documents indexed at the same > millisecond). We have 20 lower bits, so one would need a sustained > indexing rate of over 1M documents per millisecond (or 1B docs/sec) to > introduce a permanent skew due to indexing. > > There is system clock skew between shards of course, but an update > processor that added a date field would include that as well. > > The code in VersionInfo is: > > public long getNewClock() { > synchronized (clockSync) { > long time = System.currentTimeMillis(); > long result = time << 20; > if (result <= vclock) { > result = vclock + 1; > } > vclock = result; > return vclock; > } > } > > > -Yonik > > > -- so in a stable system running for > > a long time, if shardA gets signifcantly more updates then shardB the > > _version_ numbers can get skewed and a new doc in shardB might be updated > > with a _version_ less then the _version_ of a document added to shardA > > well before that. > > > > But maybe I'm remembering wrong? > > > > > > > > -Hoss > > http://www.lucidworks.com/ > --089e013c69d41c0d02052fc3bd5f--