You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Uwe Schindler <uw...@thetaphi.de> on 2010/11/11 19:49:01 UTC
Antw.: Solr 1.4.1 Analysis console gives error regarding CharTermAttributeImpl that is not in the target
I still think this is a bug in analysis.jsp. Copyto does not work here correctly because it tries to copy a ta to cta.seems that analysis.hap does generate the Target attributesource incorrect.
I will look into this.
---
Uwe Schindler
Generics Policeman
Bremen, Germany
----- Reply message -----
Von: "Burton-West, Tom" <tb...@umich.edu>
Datum: Do., Nov. 11, 2010 19:03
Betreff: Solr 1.4.1 Analysis console gives error regarding CharTermAttributeImpl that is not in the target
An: "dev@lucene.apache.org" <de...@lucene.apache.org>
Hello all,
I am using Solr 1.4.1 and a custom filter that worked with a previous version of Solr that used Lucene 2.9. When I try to use the analysis console I get this error message:
java.lang.IllegalArgumentException: This AttributeSource contains AttributeImpl of type org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl that is not in the target
(See below for stack trace that shows this is an interaction of the custom "punctuation filter" and the Analysis jsp)
I believe this has to do with this JIRA issue: https://issues.apache.org/jira/browse/LUCENE-2302
I looked at the most recent org.apache.lucene.analysis package document http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/analysis/package.html?view=co but didn't see a mention of CharTermAttributeImpl
Can someone point me to the documentation or example code that might explain the issue?
Tom Burton-West
Stack trace excerpt:
Caused by: java.lang.IllegalArgumentException: This AttributeSource contains AttributeImpl of type org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl that is not in the target
at org.apache.lucene.util.AttributeSource.copyTo(AttributeSource.java:493)
at org.apache.jsp.admin.analysis_jsp$1.incrementToken(org.apache.jsp.admin.analysis_jsp:102)
at org.apache.solr.analysis.PunctuationFilter.incrementToken(PunctuationFilter.java:40)
at org.apache.jsp.admin.analysis_jsp.getTokens(org.apache.jsp.admin.analysis_jsp:131)
at org.apache.jsp.admin.analysis_jsp.doAnalyzer(org.apache.jsp.admin.analysis_jsp:110)
at org.apache.jsp.admin.analysis_jsp._jspService(org.apache.jsp.admin.analysis_jsp:718)
RE: Antw.: Solr 1.4.1 Analysis console gives error regarding CharTermAttributeImpl that is not in the target
Posted by Uwe Schindler <uw...@thetaphi.de>.
It's fixed now in branch_3x!
Thanks Tom!
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de
> -----Original Message-----
> From: Burton-West, Tom [mailto:tburtonw@umich.edu]
> Sent: Thursday, November 11, 2010 9:44 PM
> To: dev@lucene.apache.org
> Cc: uwe@thetaphi.de
> Subject: RE: Antw.: Solr 1.4.1 Analysis console gives error regarding
> CharTermAttributeImpl that is not in the target
>
> Thanks Uwe,
>
> I recompiled my filter against revision 1030032 of Lucene/Solr and confirmed
> the same behavior (error message about "CharTermAttributeImpl that is not in
> the target" Then I applied your patch and recompiled Lucene/Solr. Your patch
> fixes the problem. Analysis.jsp now works fine with my filter.
>
> Opened issue SOLR-2234
>
> Tom
>
> -----Original Message-----
> From: Uwe Schindler [mailto:uwe@thetaphi.de]
> Sent: Thursday, November 11, 2010 2:49 PM
> To: dev@lucene.apache.org
> Subject: RE: Antw.: Solr 1.4.1 Analysis console gives error regarding
> CharTermAttributeImpl that is not in the target
>
> Hi Tom,
>
> Can you try attached LuSolr patch? This is a problem of the backwards layer for
> CTA/TA coexistence. This is a hack, but ensures that for both attributes always
> use the same implementation class.
>
> If this fixes your bug can you open issue for 3.x and I will commit?
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
> > -----Original Message-----
> > From: Robert Muir [mailto:rcmuir@gmail.com]
> > Sent: Thursday, November 11, 2010 8:20 PM
> > To: dev@lucene.apache.org
> > Subject: Re: Antw.: Solr 1.4.1 Analysis console gives error regarding
> > CharTermAttributeImpl that is not in the target
> >
> > On Thu, Nov 11, 2010 at 2:05 PM, Burton-West, Tom <tb...@umich.edu>
> > wrote:
> > > Sorry about the confusion (my confusion mostly:). I was actually
> > > using revision 1030032 of Lucene/Solr (see below) with a custom
> > > token filter
> > that does not use CharTermAttribute. I'll recompile the custom filter
> > against this revision and verify that the analysis.jsp produces the
> > same results in a few minutes.
> > >
> >
> > Thanks Tom, this sounds like a good catch then. From your previous
> > reply, i do think some of the issues discussed in SOLR-2051 could be related.
> >
> > As I mentioned there, this analysis.jsp is not well-behaved: it "cross
> > the tokenstreams", and really I think Uwe's comment at
> > http://s.apache.org/n5 describes the proper solution, where it then is
> > a well- behaved, more accurate representation of what is going on with
> analysis.
> >
> > I think this is why you probably don't have any other problems with
> > your filter, except in this analysis.jsp.
> >
> > But, it would still be good to check that its not a general bug in
> > AttributeSource.copyTo, because if so, someone will hit this problem
> > with SynonymFilter combined with an old TokenStream.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For
> > additional commands, e-mail: dev-help@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
RE: Antw.: Solr 1.4.1 Analysis console gives error regarding
CharTermAttributeImpl that is not in the target
Posted by "Burton-West, Tom" <tb...@umich.edu>.
Thanks Uwe,
I recompiled my filter against revision 1030032 of Lucene/Solr and confirmed the same behavior (error message about "CharTermAttributeImpl that is not in the target" Then I applied your patch and recompiled Lucene/Solr. Your patch fixes the problem. Analysis.jsp now works fine with my filter.
Opened issue SOLR-2234
Tom
-----Original Message-----
From: Uwe Schindler [mailto:uwe@thetaphi.de]
Sent: Thursday, November 11, 2010 2:49 PM
To: dev@lucene.apache.org
Subject: RE: Antw.: Solr 1.4.1 Analysis console gives error regarding CharTermAttributeImpl that is not in the target
Hi Tom,
Can you try attached LuSolr patch? This is a problem of the backwards layer for CTA/TA coexistence. This is a hack, but ensures that for both attributes always use the same implementation class.
If this fixes your bug can you open issue for 3.x and I will commit?
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de
> -----Original Message-----
> From: Robert Muir [mailto:rcmuir@gmail.com]
> Sent: Thursday, November 11, 2010 8:20 PM
> To: dev@lucene.apache.org
> Subject: Re: Antw.: Solr 1.4.1 Analysis console gives error regarding
> CharTermAttributeImpl that is not in the target
>
> On Thu, Nov 11, 2010 at 2:05 PM, Burton-West, Tom <tb...@umich.edu>
> wrote:
> > Sorry about the confusion (my confusion mostly:). I was actually
> > using revision 1030032 of Lucene/Solr (see below) with a custom
> > token filter
> that does not use CharTermAttribute. I'll recompile the custom filter
> against this revision and verify that the analysis.jsp produces the
> same results in a few minutes.
> >
>
> Thanks Tom, this sounds like a good catch then. From your previous
> reply, i do think some of the issues discussed in SOLR-2051 could be related.
>
> As I mentioned there, this analysis.jsp is not well-behaved: it "cross
> the tokenstreams", and really I think Uwe's comment at
> http://s.apache.org/n5 describes the proper solution, where it then is
> a well- behaved, more accurate representation of what is going on with analysis.
>
> I think this is why you probably don't have any other problems with
> your filter, except in this analysis.jsp.
>
> But, it would still be good to check that its not a general bug in
> AttributeSource.copyTo, because if so, someone will hit this problem
> with SynonymFilter combined with an old TokenStream.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For
> additional commands, e-mail: dev-help@lucene.apache.org
RE: Antw.: Solr 1.4.1 Analysis console gives error regarding CharTermAttributeImpl that is not in the target
Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi Tom,
Can you try attached LuSolr patch? This is a problem of the backwards layer for CTA/TA coexistence. This is a hack, but ensures that for both attributes always use the same implementation class.
If this fixes your bug can you open issue for 3.x and I will commit?
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de
> -----Original Message-----
> From: Robert Muir [mailto:rcmuir@gmail.com]
> Sent: Thursday, November 11, 2010 8:20 PM
> To: dev@lucene.apache.org
> Subject: Re: Antw.: Solr 1.4.1 Analysis console gives error regarding
> CharTermAttributeImpl that is not in the target
>
> On Thu, Nov 11, 2010 at 2:05 PM, Burton-West, Tom <tb...@umich.edu>
> wrote:
> > Sorry about the confusion (my confusion mostly:). I was actually
> > using revision 1030032 of Lucene/Solr (see below) with a custom token filter
> that does not use CharTermAttribute. I'll recompile the custom filter against
> this revision and verify that the analysis.jsp produces the same results in a few
> minutes.
> >
>
> Thanks Tom, this sounds like a good catch then. From your previous reply, i do
> think some of the issues discussed in SOLR-2051 could be related.
>
> As I mentioned there, this analysis.jsp is not well-behaved: it "cross the
> tokenstreams", and really I think Uwe's comment at
> http://s.apache.org/n5 describes the proper solution, where it then is a well-
> behaved, more accurate representation of what is going on with analysis.
>
> I think this is why you probably don't have any other problems with your filter,
> except in this analysis.jsp.
>
> But, it would still be good to check that its not a general bug in
> AttributeSource.copyTo, because if so, someone will hit this problem with
> SynonymFilter combined with an old TokenStream.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org
Re: Antw.: Solr 1.4.1 Analysis console gives error regarding
CharTermAttributeImpl that is not in the target
Posted by Robert Muir <rc...@gmail.com>.
On Thu, Nov 11, 2010 at 2:05 PM, Burton-West, Tom <tb...@umich.edu> wrote:
> Sorry about the confusion (my confusion mostly:). I was actually using revision 1030032 of Lucene/Solr (see below)
> with a custom token filter that does not use CharTermAttribute. I'll recompile the custom filter against this revision and verify that the analysis.jsp produces the same results in a few minutes.
>
Thanks Tom, this sounds like a good catch then. From your previous
reply, i do think some of the issues discussed in SOLR-2051 could be
related.
As I mentioned there, this analysis.jsp is not well-behaved: it "cross
the tokenstreams", and really I think Uwe's comment at
http://s.apache.org/n5 describes the proper solution, where it then is
a well-behaved, more accurate representation of what is going on with
analysis.
I think this is why you probably don't have any other problems with
your filter, except in this analysis.jsp.
But, it would still be good to check that its not a general bug in
AttributeSource.copyTo, because if so, someone will hit this problem
with SynonymFilter combined with an old TokenStream.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
RE: Antw.: Solr 1.4.1 Analysis console gives error regarding
CharTermAttributeImpl that is not in the target
Posted by "Burton-West, Tom" <tb...@umich.edu>.
Sorry about the confusion (my confusion mostly:). I was actually using revision 1030032 of Lucene/Solr (see below)
with a custom token filter that does not use CharTermAttribute. I'll recompile the custom filter against this revision and verify that the analysis.jsp produces the same results in a few minutes.
Solr Specification Version: 3.0.0.2010.11.03.16.59.02
Solr Implementation Version: 3.1-SNAPSHOT 1030032 - tburtonw - 2010-11-03 16:59:02
Lucene Specification Version: 3.1-SNAPSHOT
Lucene Implementation Version: 3.1-SNAPSHOT 1030032 - 2010-11-03 17:00:44
Tom
-----Original Message-----
From: Robert Muir [mailto:rcmuir@gmail.com]
Sent: Thursday, November 11, 2010 1:54 PM
To: dev@lucene.apache.org
Subject: Re: Antw.: Solr 1.4.1 Analysis console gives error regarding CharTermAttributeImpl that is not in the target
On Thu, Nov 11, 2010 at 1:49 PM, Uwe Schindler <uw...@thetaphi.de> wrote:
> I still think this is a bug in analysis.jsp. Copyto does not work here
> correctly because it tries to copy a ta to cta.seems that analysis.hap does
> generate the Target attributesource incorrect.
>
> I will look into this.
I think (perhaps I am mistaken), that Tom somehow mixed up some newer
binaries with Solr 1.4.1/Lucene 2.9
Tom, am i mistaken? Your message says you are using Solr 1.4.1, thats
whats confusing me.
Did you actually receive this error on branch_3x Solr's analysis.jsp
with an old TermAttribute-using TokenFilter?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Antw.: Solr 1.4.1 Analysis console gives error regarding
CharTermAttributeImpl that is not in the target
Posted by Robert Muir <rc...@gmail.com>.
On Thu, Nov 11, 2010 at 1:49 PM, Uwe Schindler <uw...@thetaphi.de> wrote:
> I still think this is a bug in analysis.jsp. Copyto does not work here
> correctly because it tries to copy a ta to cta.seems that analysis.hap does
> generate the Target attributesource incorrect.
>
> I will look into this.
I think (perhaps I am mistaken), that Tom somehow mixed up some newer
binaries with Solr 1.4.1/Lucene 2.9
Tom, am i mistaken? Your message says you are using Solr 1.4.1, thats
whats confusing me.
Did you actually receive this error on branch_3x Solr's analysis.jsp
with an old TermAttribute-using TokenFilter?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
RE: Antw.: Solr 1.4.1 Analysis console gives error regarding
CharTermAttributeImpl that is not in the target
Posted by "Burton-West, Tom" <tb...@umich.edu>.
Thanks Uwe,
A bug in analysis.jsp is consistent with what I am seeing. I can run explain/debug queries using my filter in the Solr/Lucene 3.x version and it’s clearly working. However I get the error when I try the analysis console. Is this the same issue as SOLR-2051?
Tom
From: Uwe Schindler [mailto:uwe@thetaphi.de]
Sent: Thursday, November 11, 2010 1:49 PM
To: Burton-West, Tom; dev@lucene.apache.org
Subject: Antw.: Solr 1.4.1 Analysis console gives error regarding CharTermAttributeImpl that is not in the target
I still think this is a bug in analysis.jsp. Copyto does not work here correctly because it tries to copy a ta to cta.seems that analysis.hap does generate the Target attributesource incorrect.
I will look into this.
---
Uwe Schindler
Generics Policeman
Bremen, Germany
----- Reply message -----
Von: "Burton-West, Tom" <tb...@umich.edu>
Datum: Do., Nov. 11, 2010 19:03
Betreff: Solr 1.4.1 Analysis console gives error regarding CharTermAttributeImpl that is not in the target
An: "dev@lucene.apache.org" <de...@lucene.apache.org>
Hello all,
I am using Solr 1.4.1 and a custom filter that worked with a previous version of Solr that used Lucene 2.9. When I try to use the analysis console I get this error message:
java.lang.IllegalArgumentException: This AttributeSource contains AttributeImpl of type org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl that is not in the target
(See below for stack trace that shows this is an interaction of the custom "punctuation filter" and the Analysis jsp)
I believe this has to do with this JIRA issue: https://issues.apache.org/jira/browse/LUCENE-2302
I looked at the most recent org.apache.lucene.analysis package document http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/analysis/package.html?view=co but didn't see a mention of CharTermAttributeImpl
Can someone point me to the documentation or example code that might explain the issue?
Tom Burton-West
Stack trace excerpt:
Caused by: java.lang.IllegalArgumentException: This AttributeSource contains AttributeImpl of type org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl that is not in the target
at org.apache.lucene.util.AttributeSource.copyTo(AttributeSource.java:493)
at org.apache.jsp.admin.analysis_jsp$1.incrementToken(org.apache.jsp.admin.analysis_jsp:102)
at org.apache.solr.analysis.PunctuationFilter.incrementToken(PunctuationFilter.java:40)
at org.apache.jsp.admin.analysis_jsp.getTokens(org.apache.jsp.admin.analysis_jsp:131)
at org.apache.jsp.admin.analysis_jsp.doAnalyzer(org.apache.jsp.admin.analysis_jsp:110)
at org.apache.jsp.admin.analysis_jsp._jspService(org.apache.jsp.admin.analysis_jsp:718)