Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 60605 invoked from network); 11 Apr 2010 10:01:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Apr 2010 10:01:57 -0000 Received: (qmail 75277 invoked by uid 500); 11 Apr 2010 10:01:56 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 75162 invoked by uid 500); 11 Apr 2010 10:01:56 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 75154 invoked by uid 99); 11 Apr 2010 10:01:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Apr 2010 10:01:56 +0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=AWL,HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [85.25.71.29] (HELO mail.troja.net) (85.25.71.29) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Apr 2010 10:01:49 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.troja.net (Postfix) with ESMTP id 347EAD36002 for ; Sun, 11 Apr 2010 12:01:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.troja.net Received: from mail.troja.net ([127.0.0.1]) by localhost (megaira.troja.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H+QyOr1I0cjY for ; Sun, 11 Apr 2010 12:01:21 +0200 (CEST) Received: from VEGA (port-83-236-62-54.dynamic.qsc.de [83.236.62.54]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.troja.net (Postfix) with ESMTPSA id 7C048D36001 for ; Sun, 11 Apr 2010 12:01:20 +0200 (CEST) From: "Uwe Schindler" To: References: <20100410175130.8121A23888CD@eris.apache.org> <002f01cad95a$de1fcaf0$9a5f60d0$@de> In-Reply-To: Subject: RE: svn commit: r932773 - /lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatchVersion.java Date: Sun, 11 Apr 2010 12:01:24 +0200 Message-ID: <003301cad95d$f250fbe0$d6f2f3a0$@de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0034_01CAD96E.B5D9CBE0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcrZXBXVmTd+bSWmTJyCjOyugvU8RgAAcj+A Content-Language: de ------=_NextPart_000_0034_01CAD96E.B5D9CBE0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is why i added the comment. But I forgot about it when I committed = the lucene refactoring J So lets fix it with a simple getter! =20 ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de =20 From: Robert Muir [mailto:rcmuir@gmail.com]=20 Sent: Sunday, April 11, 2010 11:47 AM To: java-dev@lucene.apache.org Subject: Re: svn commit: r932773 - = /lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatchV= ersion.java =20 I agree we should do something better, I do not like the way the test = looks now (no offense) as it is prone to break...=20 On Sun, Apr 11, 2010 at 5:39 AM, Uwe Schindler wrote: Robert, as the comment says, it=E2=80=99s a hack. How about simply adding a = public getter method for the matchVersion to the base class = StopwordAwareAna? Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de > -----Original Message----- > From: rmuir@apache.org [mailto:rmuir@apache.org] > Sent: Saturday, April 10, 2010 7:52 PM > To: java-commits@lucene.apache.org > Subject: svn commit: r932773 - > = /lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatc > hVersion.java > > Author: rmuir > Date: Sat Apr 10 17:51:30 2010 > New Revision: 932773 > > URL: http://svn.apache.org/viewvc?rev=3D932773 = &view=3Drev > Log: > fix failing test, StdAnalyzer now stores this in its superclass > > Modified: > > = lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch > Version.java > > Modified: > = lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch > Version.java > URL: > = http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/ > = solr/analysis/TestLuceneMatchVersion.java?rev=3D932773&r1=3D932772&r2=3D9= 3277 > 3&view=3Ddiff > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D > --- > = lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch > Version.java (original) > +++ > = lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch > Version.java Sat Apr 10 17:51:30 2010 > @@ -68,8 +68,8 @@ public class TestLuceneMatchVersion exte > tok =3D (StandardTokenizer) tsi.getTokenizer(); > assertFalse(tok.isReplaceInvalidAcronym()); > > - // this is a hack to get the private matchVersion field in > StandardAnalyzer, may break in later lucene versions - we have no > getter :( > - final Field matchVersionField =3D > StandardAnalyzer.class.getDeclaredField("matchVersion"); > + // this is a hack to get the private matchVersion field in > StandardAnalyzer's superclass, may break in later lucene versions - we > have no getter :( > + final Field matchVersionField =3D > = StandardAnalyzer.class.getSuperclass().getDeclaredField("matchVersion") > ; > matchVersionField.setAccessible(true); > > type =3D schema.getFieldType("textStandardAnalyzerDefault"); > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org --=20 Robert Muir rcmuir@gmail.com ------=_NextPart_000_0034_01CAD96E.B5D9CBE0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

This is why i added the comment. But I forgot about it = when I committed the lucene refactoring J So lets fix it = with a simple getter!

 

-----

Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 = Bremen

http://www.thetaphi.de<= /p>

eMail: uwe@thetaphi.de

 

From:= Robert = Muir [mailto:rcmuir@gmail.com]
Sent: Sunday, April 11, 2010 11:47 AM
To: java-dev@lucene.apache.org
Subject: Re: svn commit: r932773 - /lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatchV= ersion.java

 

I agree we should do = something better, I do not like the way the test looks now (no offense) as it is = prone to break... 

On Sun, Apr 11, 2010 at 5:39 AM, Uwe Schindler = <uwe@thetaphi.de> = wrote:

Robert,

as the comment says, it=E2=80=99s a hack. How about simply adding a = public getter method for the matchVersion  to the base class = StopwordAwareAna?

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de



> -----Original Message-----
> From: rmuir@apache.org = [mailto:rmuir@apache.org]
> Sent: Saturday, April 10, 2010 7:52 PM
> To: java-commits@lucene.apache= .org
> Subject: svn commit: r932773 -
> = /lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatc > hVersion.java
>
> Author: rmuir
> Date: Sat Apr 10 17:51:30 2010
> New Revision: 932773
>
> URL: http://svn.apache.org/viewvc?rev=3D932773&view=3Dre= v
> Log:
> fix failing test, StdAnalyzer now stores this in its superclass
>
> Modified:
>
> = lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch > Version.java
>
> Modified:
> = lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch > Version.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/= test/org/apache/
> solr/analysis/TestLuceneMatchVersion.java?rev=3D932773&r1=3D932772&am= p;r2=3D93277
> 3&view=3Ddiff
> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =3D=3D=3D=3D=3D=3D=3D
> ---
> = lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch > Version.java (original)
> +++
> = lucene/dev/trunk/solr/src/test/org/apache/solr/analysis/TestLuceneMatch > Version.java Sat Apr 10 17:51:30 2010
> @@ -68,8 +68,8 @@ public class TestLuceneMatchVersion exte
>      tok =3D (StandardTokenizer) = tsi.getTokenizer();
>      assertFalse(tok.isReplaceInvalidAcronym());
>
> -    // this is a hack to get the private matchVersion = field in
> StandardAnalyzer, may break in later lucene versions - we have = no
> getter :(
> -    final Field matchVersionField =3D
> = StandardAnalyzer.class.getDeclaredField("matchVersion");
> +    // this is a hack to get the private matchVersion = field in
> StandardAnalyzer's superclass, may break in later lucene versions - = we
> have no getter :(
> +    final Field matchVersionField =3D
> StandardAnalyzer.class.getSuperclass().getDeclaredField("matchVersio= n")
> ;
>      matchVersionField.setAccessible(true);
>
>      type =3D schema.getFieldType("textStandardAnalyzerDefault");
>


------------------------------------------= ---------------------------
To unsubscribe, e-mail: java-dev-unsubscri= be@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apac= he.org




--
Robert Muir
rcmuir@gmail.com

------=_NextPart_000_0034_01CAD96E.B5D9CBE0--