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 2AA81200C56 for ; Fri, 31 Mar 2017 01:26:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2945C160B9A; Thu, 30 Mar 2017 23:26:47 +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 7376A160B8B for ; Fri, 31 Mar 2017 01:26:46 +0200 (CEST) Received: (qmail 74357 invoked by uid 500); 30 Mar 2017 23:26:43 -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 74339 invoked by uid 99); 30 Mar 2017 23:26:42 -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; Thu, 30 Mar 2017 23:26:42 +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 E85BCC1380 for ; Thu, 30 Mar 2017 23:26:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.622 X-Spam-Level: X-Spam-Status: No, score=-1.622 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=wolfram.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id suwDoYIZPVl1 for ; Thu, 30 Mar 2017 23:26:39 +0000 (UTC) Received: from relay-ext.wolfram.com (relay.wolfram.com [140.177.205.37]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 71FCD5FCB5 for ; Thu, 30 Mar 2017 23:26:38 +0000 (UTC) Received: from [192.168.1.6] (host119.190-230-128.telecom.net.ar [190.230.128.119]) by relay-ext.wolfram.com (Postfix) with ESMTPSA id 57302D010C for ; Thu, 30 Mar 2017 18:26:30 -0500 (CDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay-ext.wolfram.com 57302D010C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfram.com; s=relay; t=1490916390; bh=L2OooOpkPirYmBhsLxjDG2+sMc+2x8il4FCIHnRRHyY=; h=To:References:From:Date:In-Reply-To:From; b=1oPxhG0HgaRhVR37MkdSL0bxa+fcGS8gz87R/linGyAbBz/OE4/oASVEiA0yNsEZT xklr0YPwXsVCtCdCcPV6ugpzfPif5zayes2vY8YW+Py3LZeB4a4YABorDa2aHytXbR 5gvKuRAS+ko5224FDxLHZQH1To81pmuk1vyVdPpg= Subject: Re: Adding TokenFilters to a CustomAnalyzer is too inflexible To: java-user@lucene.apache.org References: <7df6aa92-635f-5d97-ca90-e8a4474032dd@wolfram.com> <047a01d2a921$7ce17150$76a453f0$@thetaphi.de> From: =?UTF-8?Q?Nicol=c3=a1s_Lichtmaier?= Message-ID: <812ac2d2-4faa-2011-cf70-2389de78d044@wolfram.com> Date: Thu, 30 Mar 2017 20:26:25 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <047a01d2a921$7ce17150$76a453f0$@thetaphi.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit archived-at: Thu, 30 Mar 2017 23:26:47 -0000 Ok, so a flexible interface would be to be able to pass some TokenFilterFactory that would be called each time a TokenFilter is needed. Would that be ok? El 30/03/17 a las 03:47, Uwe Schindler escribió: > A TokenFilter object already build won't work, because the Analyzer must create new instances of the TokenFilters as needed. > > Uwe > > ----- > Uwe Schindler > Achterdiek 19, D-28357 Bremen > http://www.thetaphi.de > eMail: uwe@thetaphi.de > >> -----Original Message----- >> From: Nicolás Lichtmaier [mailto:nicolasl@wolfram.com] >> Sent: Wednesday, March 29, 2017 7:00 PM >> To: java-user@lucene.apache.org >> Subject: Adding TokenFilters to a CustomAnalyzer is too inflexible >> >> I'm using a CustomAnalyzer.Builder to set up an analyzer. I now would >> like to add synonym processing, I already have the SynonymMap in memory. >> But the builder interface only takes String arguments. Wouldn't it be a >> good thing to add a method to CustomAnalyzer.Builder to add a >> TokenFilter object already constructed, instead of only being able to >> pass a class name? That is: overload the addTokenFilter method to do >> this: builder.addTokenizer(new MyTokenFilter(....)); >> >> Am I missing something? >> >> Should I create a patch with this minor modification and send it? >> >> Thanks! >> >> --------------------------------------------------------------------- >> 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