From dev-return-11041-apmail-lucenenet-dev-archive=lucenenet.apache.org@lucenenet.apache.org Mon Aug 12 14:25:03 2019 Return-Path: X-Original-To: apmail-lucenenet-dev-archive@www.apache.org Delivered-To: apmail-lucenenet-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 3ABF119075 for ; Mon, 12 Aug 2019 14:25:03 +0000 (UTC) Received: (qmail 87859 invoked by uid 500); 12 Aug 2019 14:25:02 -0000 Delivered-To: apmail-lucenenet-dev-archive@lucenenet.apache.org Received: (qmail 87800 invoked by uid 500); 12 Aug 2019 14:25:02 -0000 Mailing-List: contact dev-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucenenet.apache.org Delivered-To: mailing list dev@lucenenet.apache.org Received: (qmail 87773 invoked by uid 99); 12 Aug 2019 14:25:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Aug 2019 14:25:02 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DEB68E2FBA for ; Mon, 12 Aug 2019 14:25:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4A17A27760 for ; Mon, 12 Aug 2019 14:25:00 +0000 (UTC) Date: Mon, 12 Aug 2019 14:25:00 +0000 (UTC) From: =?utf-8?Q?Emil_M=C3=BCller_=28JIRA=29?= To: dev@lucenenet.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LUCENENET-615) PerFieldAnalyzerWrapper.GetTokenStream throws NullReferenceException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENENET-615?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emil M=C3=BCller updated LUCENENET-615: ---------------------------------- Description:=20 var english =3D new EnglishAnalyzer(Lucene.Net.Util.LuceneVersion.LUCENE_48= ); var whitespace =3D new WhitespaceAnalyzer(Lucene.Net.Util.LuceneVersion.LUC= ENE_48); var pf =3D new PerFieldAnalyzerWrapper(_englishAnalyzer, new Dictionary() \{{ "foo", whitespaceAnalyzer }});}} var test1 =3D english.GetTokenStream(null, question); // Does not throw var test2 =3D pf.GetTokenStream(null, question); // Throws NullReferenceExc= eption =C2=A0 I don't think I'm doing anything wrong, but the last line crashes with the = abovementioned exception. =C2=A0 (Tried preformatting the above text, but Jira removes newlines. Sorry for t= hat.) was: var english =3D new EnglishAnalyzer(Lucene.Net.Util.LuceneVersion.LUCENE_48= ); var whitespace =3D new WhitespaceAnalyzer(Lucene.Net.Util.LuceneVersion.LUC= ENE_48);{{var pf =3D new PerFieldAnalyzerWrapper(_englishAnalyzer, new Dict= ionary() { { "foo", whitespaceAnalyzer } });}} var test1 =3D english.GetTokenStream(null, question); // Does not throw var test2 =3D pf.GetTokenStream(null, question); // Throws NullReferenceExc= eption =C2=A0 I don't think I'm doing anything wrong, but the last line crashes with the = abovementioned exception. =C2=A0 (Tried preformatting the above text, but Jira removes newlines. Sorry for t= hat.) > PerFieldAnalyzerWrapper.GetTokenStream throws NullReferenceException > -------------------------------------------------------------------- > > Key: LUCENENET-615 > URL: https://issues.apache.org/jira/browse/LUCENENET-615 > Project: Lucene.Net > Issue Type: Bug > Components: Lucene.Net.Analysis.Common > Affects Versions: Lucene.Net 4.8.0 > Reporter: Emil M=C3=BCller > Priority: Major > > var english =3D new EnglishAnalyzer(Lucene.Net.Util.LuceneVersion.LUCENE_= 48); > var whitespace =3D new WhitespaceAnalyzer(Lucene.Net.Util.LuceneVersion.L= UCENE_48); > var pf =3D new PerFieldAnalyzerWrapper(_englishAnalyzer, new Dictionary() \{{ "foo", whitespaceAnalyzer }});}} > var test1 =3D english.GetTokenStream(null, question); // Does not throw > var test2 =3D pf.GetTokenStream(null, question); // Throws NullReferenceE= xception > =C2=A0 > I don't think I'm doing anything wrong, but the last line crashes with th= e abovementioned exception. > =C2=A0 > (Tried preformatting the above text, but Jira removes newlines. Sorry for= that.) -- This message was sent by Atlassian JIRA (v7.6.14#76016)