From java-user-return-63744-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Thu May 24 13:20:42 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 9F846180636 for ; Thu, 24 May 2018 13:20:41 +0200 (CEST) Received: (qmail 67149 invoked by uid 500); 24 May 2018 11:20:35 -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 67136 invoked by uid 99); 24 May 2018 11:20:34 -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, 24 May 2018 11:20:34 +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 683A3CAD22 for ; Thu, 24 May 2018 11:20:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.45 X-Spam-Level: * X-Spam-Status: No, score=1.45 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_ASCII_DIVIDERS=0.8, KAM_INFOUSMEBIZ=0.75, MIME_QP_LONG_LINE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=openindex.io 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 7JPOf6m_8X91 for ; Thu, 24 May 2018 11:20:29 +0000 (UTC) Received: from mail1.ams.nl.openindex.io (mail1.ams.nl.openindex.io [141.105.125.41]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 2264A5F485 for ; Thu, 24 May 2018 11:20:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail1.ams.nl.openindex.io (Postfix) with ESMTP id ADE3B380D9D for ; Thu, 24 May 2018 11:20:23 +0000 (UTC) Received: from mail1.ams.nl.openindex.io ([127.0.0.1]) by localhost (mail1.ams.nl.openindex.io [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31nq2HWMc44c for ; Thu, 24 May 2018 11:20:23 +0000 (UTC) Received: from mail1.ams.nl.openindex.io (localhost [127.0.0.1]) by mail1.ams.nl.openindex.io (Postfix) with ESMTP id 8F812380747 for ; Thu, 24 May 2018 11:20:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=openindex.io; s=mail; t=1527160823; bh=fDMbXkqQwCnqDXKhlGYLQllhOed9Aw4gLHhg4I/9nPY=; h=Subject:From:To:Date:From; b=HDB+JuAB9/xzTP0PJ3TT8mssSOwQmlw/WqNHMNPDT5MAseTUrJ2yJkUXji1CLWAUc sZfw+T0rpukx96iEEn1K8hLFJws2fQ3aCOr77FyeqVxmRBUaEbwvM9J2h1ZUXbwQE7 buwB6/DNbeg7WEp7LYs9xFdjpiEVyLmvD6vAzBQQggmRoMs41kQmJ+ahyR+NLfK2cV 4Ndh8bo5d1VFyh8Qzwz3Ch8B9maTESe4c0082faRAxLNjKll8z3iKbQsX0JrC+oR88 v/lRFh7n/C16RGoGf1zZ+J8jSAUnmiXD7hDI0v7fYO6eFcJIAgbv/ir3ehKrzFfrFL eDiiLvWg98+hw== Subject: RE: Rewrite SynonymQuery to support payloads From: =?utf-8?Q?Markus_Jelsma?= To: =?utf-8?Q?java-user=40lucene=2Eapache=2Eorg?= Date: Thu, 24 May 2018 11:20:23 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-Mailer: Zarafa 7.2.1-51838 X-Original-To: Message-Id: Hello Alessandro, I was looking for something more light weight, or extend SpanOrQuery to support this case. The rewrite is part of our custom parser extending ExtendedDismaxQParser where we add support for payloads by rewriting everything to a payload equivalent. This is almost the case with SpanOrQuery, i think, but i need to know how i can let it score just once. Where do i need to put this logic=3F Reading SynonymQuery code doesn't make it obvious to me right away. Do i need to look into Scorer logic, or Weight logic=3F What building blocks do i need, what parts of SynonymQuery could i borrow, and what not=3F Or, if there is a better way, should i instead try to add payload support to an extended SynonymQuery, would that be easier=3F And how should i do that=3F What would be the best to tackle this issue=3F Many thanks, Markus -----Original message----- > From:Alessandro Benedetti > Sent: Wednesday 23rd May 2018 13:01 > To: java-user@lucene.apache.org > Subject: Re: Rewrite SynonymQuery to support payloads >=20 > Hi Markus, > I contributed to Solr this exact part : >=20 > https://issues.apache.org/jira/browse/SOLR-12238 >=20 > Patch and Pull Request is attached but it has not been reviewed yet. > Give it a look, and then we can continue the discussion here! > let me know if you feel your requirement is different ! >=20 > Cheers >=20 > On Wed, May 23, 2018 at 11:41 AM, Markus Jelsma > wrote: >=20 > > Hello, > > > > To support payloads we rewrite SynonymQuery to a pair of SpanTerm queries > > which we then can wrap in the PayloadScoreQuery. This is not the right way > > to do this because if both clauses match, both are also scored.=C2=A0 We could > > try to rewrite SynonymQuery to a SpanOrQuery but i suppose that would also > > cause both clauses to score if they match. > > > > So, how can i transform a SynonymQuery into something that i can wrap into > > PayloadScoreQuery on Lucene/Solr 7.x=3F > > > > Many thanks, > > Markus > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > For additional commands, e-mail: java-user-help@lucene.apache.org > > > > > --=20 > -------------------------- >=20 > Benedetti Alessandro > Visiting card - http://about.me/alessandro_benedetti > Blog - http://alexbenedetti.blogspot.co.uk >=20 > "Tyger, tyger burning bright > In the forests of the night, > What immortal hand or eye > Could frame thy fearful symmetry=3F" >=20 > William Blake - Songs of Experience -1794 England --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org