Re: /trunk ClassCastException with BaseTokenizerFactory

2009-08-24 Thread Lance Norskog
Is it possible to mark out backwards-incompatible changes with deprecation? So at least we get warnings in Eclipse/Netbeans etc? On Fri, Aug 21, 2009 at 9:50 AM, Mark Miller markrmil...@gmail.com wrote: Ryan McKinley wrote: Ahh, I see: Tokenizer extends TokenStream So if this is going

Re: /trunk ClassCastException with BaseTokenizerFactory

2009-08-24 Thread Ryan McKinley
not sure what you are asking for. The patch in SOLR-1377 (now /trunk) breaks the TokenizerFactory API. You will get an compiler error (or runtime error) with a TokenizerFactory that creates a TokenStream rather then a Tokenizer. I don't see any clean way to do this via deprecation -- if you

/trunk ClassCastException with BaseTokenizerFactory

2009-08-21 Thread Ryan McKinley
Just updated to /trunk and am now seeing this exception: Caused by: org.apache.solr.client.solrj.SolrServerException: java.lang.ClassCastException: xxx.solr.analysis.JSONKeyValueTokenizerFactory$1 cannot be cast to org.apache.lucene.analysis.Tokenizer at

Re: /trunk ClassCastException with BaseTokenizerFactory

2009-08-21 Thread Ryan McKinley
Actually I think there may be something wrong here. BaseTokenizerFactory does not make a Tokenizer, it creates a TokenStream, so it should never be cast to Tokenizer My custom TokenizerFactory now looks the same as: o.a.s.analysis.PatternTokenizerFactory Not sure what to look at next...

Re: /trunk ClassCastException with BaseTokenizerFactory

2009-08-21 Thread Yonik Seeley
On Fri, Aug 21, 2009 at 10:33 AM, Ryan McKinleyryan...@gmail.com wrote: Actually I think there may be something wrong here. BaseTokenizerFactory does not make a Tokenizer, it creates a TokenStream, so it should never be cast to Tokenizer My custom TokenizerFactory now looks the same as:

Re: /trunk ClassCastException with BaseTokenizerFactory

2009-08-21 Thread Ryan McKinley
On Aug 21, 2009, at 10:49 AM, Yonik Seeley wrote: On Fri, Aug 21, 2009 at 10:33 AM, Ryan McKinleyryan...@gmail.com wrote: Actually I think there may be something wrong here. BaseTokenizerFactory does not make a Tokenizer, it creates a TokenStream, so it should never be cast to Tokenizer

Re: /trunk ClassCastException with BaseTokenizerFactory

2009-08-21 Thread Yonik Seeley
On Fri, Aug 21, 2009 at 10:13 AM, Ryan McKinleyryan...@gmail.com wrote: I'm fine upgrading, but it seems we should the 'back compatibility' notice more explicit. Yeah... that should be fun for expert-use plugins in general. In Lucene-land, this is the release of the break... I think we've

Re: /trunk ClassCastException with BaseTokenizerFactory

2009-08-21 Thread Ryan McKinley
Ahh, I see: Tokenizer extends TokenStream So if this is going to break everything that implements TokenStream rather then Tokenizer, it seems we should change the TokenizerFactory API from: public Tokenizer create( Reader input ) rather then: public TokenStream create( Reader input );

Re: /trunk ClassCastException with BaseTokenizerFactory

2009-08-21 Thread Yonik Seeley
On Fri, Aug 21, 2009 at 12:22 PM, Ryan McKinleyryan...@gmail.com wrote: Ahh, I see:  Tokenizer extends TokenStream So if this is going to break everything that implements TokenStream rather then Tokenizer, it seems we should change the TokenizerFactory API from:  public Tokenizer create(

Re: /trunk ClassCastException with BaseTokenizerFactory

2009-08-21 Thread Mark Miller
Ryan McKinley wrote: Ahh, I see: Tokenizer extends TokenStream So if this is going to break everything that implements TokenStream rather then Tokenizer, it seems we should change the TokenizerFactory API from: public Tokenizer create( Reader input ) rather then: public TokenStream