From java-user-return-63597-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Thu Feb 22 14:23:26 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5267D18064E for ; Thu, 22 Feb 2018 14:23:26 +0100 (CET) Received: (qmail 28199 invoked by uid 500); 22 Feb 2018 13:23:24 -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 28183 invoked by uid 99); 22 Feb 2018 13:23:24 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Feb 2018 13:23:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B0AF6C0A0A for ; Thu, 22 Feb 2018 13:23:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.211 X-Spam-Level: *** X-Spam-Status: No, score=3.211 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id MYWxk8P4Fm2i for ; Thu, 22 Feb 2018 13:23:18 +0000 (UTC) Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id ECF755F124 for ; Thu, 22 Feb 2018 13:23:17 +0000 (UTC) Received: by mail-wr0-f170.google.com with SMTP id f14so10529822wre.8 for ; Thu, 22 Feb 2018 05:23:17 -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=4Kv8gn6+6Iw76vq3TQdmZ1t26kvc67J8NGoLQussfaU=; b=NtD3GicPhq5CjxR4uY8OdeGdGypswO/ri7nbs2SalbNovAp+xNSFkz71o27W4sf6Mh EtMbZnrkUEilk0xPMzGEqNSmuulqqv5ZIUzsGT3rkJ7eTnuM+0hikC3Mjx8CLkkDiH3k FE974Uqxw6FXCcdL4cQYP/8flKvEV9tR3YIuO5sf8wqDO4olpBMvblTc34n7jGUXHHuA UhQuRMZlgD+L+ibI2EOuUcFGqJx08CqLHhd0m2JAGQQ6sClTXZmENo/kbP3W8dfX/MvU Iwa7RHRTMCb0XTefxk4zJCcU5cCf7TPv1Im7m62Ta25KBMILSx8zt+Sl15k4p+n6xoEh BFzg== 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=4Kv8gn6+6Iw76vq3TQdmZ1t26kvc67J8NGoLQussfaU=; b=DjGBVk3wsyfhS6QiyqKDM0tj8Y/PzTQE0HqqX2htJEettyxfq01nBioKRwsssri5gx PKu55AZ+oY92CeJa5e2goP3zJMYr7ls466x8ZmbaVkjvNnh5LicP8Hsjd9sXs+9FddfM 6Zu2L1ccCN6V62eK7to5fULlePU/gAKQR5j++oothUEP/emMeu89IgEYANQML34lWxWq amwjSaga3ynKy50NV+tLChtJW6057cqBFpEiY6M+VeD4sLerN4Pt5NOAtIlbWL8/WrsX CGiNu9vNxsq08jD2JUmqNHPv2ZgoVViArfShZ2gB+86K+NtussPwoC+wsoPp+2M3aZNF Jkcw== X-Gm-Message-State: APf1xPANrQwGQ3VASPjLUdmvprajruxTyCmJYitbVkHB8CRZ9gg520lk 1vJIHrh3Th8I46yGhwp9K7C3oT0sNDK/V2Tf2aM= X-Google-Smtp-Source: AH8x226cIcK4LL0q59JB9cuYEjFR2L8SyRxnr/c+oMJ+T3tXH5fyH00fgcafAL9CWQ/rqsGq3XIaBuTRn8PQKNOSRZQ= X-Received: by 10.223.161.10 with SMTP id o10mr6484863wro.60.1519305797265; Thu, 22 Feb 2018 05:23:17 -0800 (PST) MIME-Version: 1.0 References: <1519139011261-0.post@n3.nabble.com> In-Reply-To: From: Adrien Grand Date: Thu, 22 Feb 2018 13:23:06 +0000 Message-ID: Subject: Re: Read DocValue twice To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary="f403045e272659f3c50565ccf238" --f403045e272659f3c50565ccf238 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable You are trying to use explain for more than what it has been designed for. Calling explain on the top hits is fine, but it seems that you need/want to do this for all matches. We don't have a solution for this. Caching the scorer doesn't work since scorers can only be iterated once. Le jeu. 22 f=C3=A9vr. 2018 =C3=A0 12:11, Vadim Gindin a =C3=A9crit : > I'd like to use "explain" mechanism to output some additional match > information: scoring formula, detailed matching information and so on. Bu= t > now it seems, "explain" works slower even than just logging of matching > information to a file from score() method. > > - What is the most effective way to do this? Is there a possibility to > accelerate "explain", for example with scorer caching? > - Lucene uses the only Scorer (for entire segment) for calling score() > method. What about explain()? > - Iterators are really - readable-once only? > > Regards, > Vadim Gindin > > On Thu, Feb 22, 2018 at 3:03 PM, Adrien Grand wrote: > > > If you are talking about explanations, then yes, it's fine. Explain() i= s > > used for debugging, it is fine if it is slow. However Lucene creates on= ly > > one Scorer for all documents of an entire segment when it comes to > actually > > running a query. > > > > Le jeu. 22 f=C3=A9vr. 2018 =C3=A0 07:06, Vadim Gindin a > > =C3=A9crit : > > > > > Adrien, thank's a lot! It looks like a working solution for my bugs.= I > > > really appreciate it. > > > > > > I just want to ask. Is it really effective way create a Scorer for > every > > > document? Can we say, that it's designed for Scorer to be lightweight > and > > > fast enough so? > > > > > > On Wed, Feb 21, 2018 at 6:42 PM, Adrien Grand > wrote: > > > > > > > This might not solve all problems, but you should stop caching the > > weight > > > > in the query and stop caching the scorer in the weight: just create= a > > new > > > > scorer in calls to explain(). > > > > > > > > Le mer. 21 f=C3=A9vr. 2018 =C3=A0 14:05, Vadim Gindin a > > > > =C3=A9crit : > > > > > > > > > The test gives the following error: > > > > > > > > > > java.lang.AssertionError: Docs enums are only supposed to be > consumed > > > in > > > > > the thread in which they have been acquired. But was acquired in > > > > > Thread[elasticsearch[node_s2][search][T#4],5,TGRP- > > CustomQueryParserIT] > > > > and > > > > > consumed in > > > > > Thread[elasticsearch[node_s2][search][T#2],5,TGRP- > > CustomQueryParserIT]. > > > > > at __randomizedtesting.SeedInfo.seed([935231818B6C9F26]:0) > > > > > at > > > > > > > > > > org.apache.lucene.index.AssertingLeafReader.assertThread( > > > > AssertingLeafReader.java:42) > > > > > at > > > > > > > > > > org.apache.lucene.index.AssertingLeafReader.access$ > > > > 000(AssertingLeafReader.java:36) > > > > > at > > > > > > > > > > org.apache.lucene.index.AssertingLeafReader$ > > > > AssertingPostingsEnum.advance(AssertingLeafReader.java:330) > > > > > at > > > > > > > > > > org.apache.lucene.search.DisjunctionDISIApproximation.advance( > > > > DisjunctionDISIApproximation.java:66) > > > > > at > > > > > > > > > > com.detectum.query.phrase.PrizeDisjunctionScorer.explain( > > > > PrizeDisjunctionScorer.java:220) > > > > > > > > > > from explain() method. > > > > > > > > > > > > > > > > > > > > On Tue, Feb 20, 2018 at 8:03 PM, Vadim Gindin < > vgindin@detectum.com> > > > > > wrote: > > > > > > > > > > > Probably it is not possible to attach files from email letter. > Here > > > > they > > > > > > are: > > > > > > > > > > > > ConstTermScorer.java > > > > > > < > > > http://lucene.472066.n3.nabble.com/file/t493564/ConstTermScorer.java> > > > > > > PrizeDisjunctionScorer.java > > > > > > > > > > > PrizeDisjunctionScorer.java> > > > > > > PhraseQuery.java > > > > > > < > http://lucene.472066.n3.nabble.com/file/t493564/PhraseQuery.java> > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Sent from: http://lucene.472066.n3.nabble.com/Lucene-Java-Users= - > > > > > > f532864.html > > > > > > > > > > > > ------------------------------------------------------------ > > --------- > > > > > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > > > > > For additional commands, e-mail: > java-user-help@lucene.apache.org > > > > > > > > > > > > > > > > > > > > > > > > > > > --f403045e272659f3c50565ccf238--