From java-user-return-63841-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Thu Jul 5 22:30: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 206FF180657 for ; Thu, 5 Jul 2018 22:30:41 +0200 (CEST) Received: (qmail 19226 invoked by uid 500); 5 Jul 2018 20:30:40 -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 19214 invoked by uid 99); 5 Jul 2018 20:30:40 -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, 05 Jul 2018 20:30:40 +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 B3F77C0F9B for ; Thu, 5 Jul 2018 20:30:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.612 X-Spam-Level: X-Spam-Status: No, score=-1.612 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=oracle.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 6Bqv1IyrPuwp for ; Thu, 5 Jul 2018 20:30:37 +0000 (UTC) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D0A3C5F58A for ; Thu, 5 Jul 2018 20:30:36 +0000 (UTC) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w65KSvkc095792 for ; Thu, 5 Jul 2018 20:30:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=7UGPrKQvjnHFUTUKOYg1smEC73FBZ6y75GlAN0xllys=; b=vvLoTN6rBzOBilDocS3Ez+STefv345Xw+z9hj8lyyB/qOlgTq8S0xYnKEzAT8PmI8/F7 MNNWdsa+dl5m7q3drF2wYimRAGwmaskMK5yKkA+KufNnUfqCJSCd4/qd3GOVNxsPD6Aa xlI11WizDspHs5arXsgnHzuDto/HrOhYXc5Bo5Pq/hv9GAtk7x5EVhI2UVA8wAkNLLSB JWaCa2hAuH80qdSgt9LSk5aNEnmm7QKCSf2x0ed1NUxbxGdC0l/Rua5/CL6VYuL5eG2K mnpwBssVDp/eASud2hIOBmTIwatUmHb/NM7Cj2uEH1DaBvomYp044eZ87S/2dL0Tmiq2 Tw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2k0dnjqb9t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 05 Jul 2018 20:30:34 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w65KUYVn004998 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 5 Jul 2018 20:30:34 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w65KUXKg020396 for ; Thu, 5 Jul 2018 20:30:33 GMT Received: from [10.149.250.32] (/10.149.250.32) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 05 Jul 2018 13:30:33 -0700 Subject: Re: Grant Ingersoll's 2009 blog article- is there a newer version? To: java-user@lucene.apache.org References: <243f7d9f-32a8-73be-b49d-ef5b5c457e66@oracle.com> <4e1576c8-fdf1-a2a9-d9ba-d179bdd09866@oracle.com> <1beebda0-8e69-1dd8-0a5f-8a4a6f291912@oracle.com> From: baris.kazar@oracle.com Organization: Oracle Corporation Message-ID: <64c055cd-9b47-1289-dc05-b245bcaf6a75@oracle.com> Date: Thu, 5 Jul 2018 16:30:33 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1beebda0-8e69-1dd8-0a5f-8a4a6f291912@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8945 signatures=668704 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807050226 One thing i noticed is that org.apache.lucene.index.IndexWriter class does not have setSimilarity and it is moved to org.apache.lucene.index.IndexWriterConfig class. thus, i resolved the first question below. Best regards On 7/5/18 3:17 PM, baris.kazar@oracle.com wrote: > org.apache.lucene.index.IndexWriter class does not have setSimilarity > method, am i missing something for this? > > i checked multiple Lucene versions. > > > next, i have this problem: > > After defining the Analyzer as the PayloadAnalyzer like on the blog > mentioned before, > > i declared org.apache.lucene.search.QueryParser (with the analyzer > mentioned above as the parameter) which was then used in declaring the > org.apache.lucene.search.Query object via parse method of parser. > > Now, i wonder how i can use PayloadScoreQuery in this scenario. > > > Best regards > > > > On 7/5/18 1:19 PM, baris.kazar@oracle.com wrote: >> i mean i know the function of BoostingTermQuery class: >> >> The BoostingTermQuery is very similar to the SpanTermQuery except >> that it factors in the value of the payload located at each of the >> positions where the Term occurs. >> >> In order to take advantage of this, you must override >> Similarity.scorePayload(String, byte[],int,int) which returns 1 by >> default. >> >> Payload scores are averaged across term occurrences in the document. >> >> >> what i am asking is as follows: >> >> Does this mean this (BoostingTermQuery in Lucene 2.9 or >> PayloadScoerQuery in latest Lucene) needs to be called for ***all the >> words*** scored in the format i mentioned | >> in the data? >> >> Best regards >> >> On 7/5/18 1:13 PM, baris.kazar@oracle.com wrote: >>> Sure, can You please point me to the location under Lucene Solr? >>> >>> In Grant's article: >>> >>> i want to know the need to use BoostingTermQuery (now in latest >>> version PayloadScoreQuery) >>> >>> where we already specify payloads in the data in the form >>> |. >>> >>> Best regards >>> >>> >>> >>> On 7/5/18 11:41 AM, Erick Erickson wrote: >>>> Maybe look at the Solr payload code to see how to do it in Lucene? >>>> >>>> But yeah, that article is quite out of date. >>>> >>>> On Thu, Jul 5, 2018 at 8:23 AM, wrote: >>>>> Thanks i saw these posts but Grant's article is based on Lucene. >>>>> >>>>> i am not using Solr. Many classes in that article does not exist >>>>> in latest >>>>> versions of Lucene like version 6.1. >>>>> >>>>> For instance BoostingTermQuery does not exist in 6.1 and the way >>>>> docs are >>>>> indexed are also different on 6.1. >>>>> >>>>> There is a new class PayloadScoreQuery but there is no examples >>>>> like this >>>>> great article how to put them together. >>>>> >>>>> Best regards >>>>> >>>>> >>>>> On 7/5/18 11:18 AM, Ishan Chattopadhyaya wrote: >>>>>> Try these, maybe? >>>>>> >>>>>> >>>>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lucidworks.com_2017_09_14_solr-2Dpayloads_&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=Ak4sr1zTaxPibIGJz26XQrj9fM4hZls8OegNbEWu1lI&s=9hxjhLoi6Lnb7KbYaOeb4-SP039x4Zx0XIynF_HzOJk&e= >>>>>> >>>>>> >>>>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.textsearch.io_-3Fp-3D5&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=Ak4sr1zTaxPibIGJz26XQrj9fM4hZls8OegNbEWu1lI&s=elEAMRZBIF2jldvS2kCD9B3r43kZ3hOToKVyR0I4qzo&e= >>>>>> >>>>>> >>>>>> On Thu, Jul 5, 2018 at 8:26 PM, wrote: >>>>>> >>>>>>> Hi,- >>>>>>> Is there a newer version of this great article from Mr. Grant >>>>>>> Ingersoll? >>>>>>> >>>>>>> >>>>>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lucidworks.com_2009_08_05_getting-2Dstarted-2Dwith-2Dpayloads_&d=DwIBaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=nlG5z5NcNdIbQAiX-BKNeyLlULCbaezrgocEvPhQkl4&m=Ak4sr1zTaxPibIGJz26XQrj9fM4hZls8OegNbEWu1lI&s=isAZ026j7ugASeuPdoeXnoi5XfSGfxEgiWECE2ziURo&e= >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>>> This article is based on Lucene 2.9. >>>>>>> Best regards >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> >>>>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >>>>>>> For additional commands, e-mail: java-user-help@lucene.apache.org >>>>>>> >>>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >>>>> For additional commands, e-mail: java-user-help@lucene.apache.org >>>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >>>> For additional commands, e-mail: java-user-help@lucene.apache.org >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >>> For additional commands, e-mail: java-user-help@lucene.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org