lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Upgrade 6.2.x Char* API's
Date Fri, 23 Sep 2016 07:46:36 GMT
Hallo Markus,

the class is still available, but directly under the analysis package. But It is marked as
"internal" and should not be used as it may be removed or changed unexpected. Why do you need
it? It does not provide much more than LowerCaseFilter can also do. It is more some utility
class to iterate over codepoints in char[] arrays.

> In both cases we sub-class TokenFilterFactories or, indeed, StopAnalyzerBase
> just because it is so convenient to use original Lucene classes as template for
> Factories or Analyzers. Why should we not be 'allowed' to load protwords, or
> stopwords just as convenient a Lucene does?

You can still do this, but the backwards compatibility layer does not work in StopAnalyzerBase.
Those classes were deprecated (you should see the deprecation in your DIE), so just use the
replacement as noted in docs: http://lucene.apache.org/core/6_2_1/analyzers-common/org/apache/lucene/analysis/util/StopwordAnalyzerBase.html

Then the problems you have should not occur anymore.

The main thing we changed in 6.2.1 was to add back the "important" tokenfilters, namely StopFilter
and LowercaseFilter as duplicates, so custom code using those classes still work. The other
stuff is deprecated and works for many cases, but you should do what the deprecation warnings
say. The code should compile then.

Uwe

> -----Original message-----
> > From:Uwe Schindler <uwe@thetaphi.de>
> > Sent: Wednesday 21st September 2016 13:30
> > To: java-user@lucene.apache.org
> > Subject: RE: Upgrade 6.2.x Char* API's
> >
> > Hi,
> >
> > CharacterUtils is a class marked as "internal" and changed its name, there
> is no requirement to add backwards compatibility. You should not use it in
> code outside of Lucene, it is just public to allow cross-package usage. With
> Java 9 mdoule system it might get hidden in the future, but not yet.
> >
> > The CharArraySet problem happens on classes subclassing
> StopAnalyzerBase that are using the protected static methods to load Word
> lists, but that cannot be solved - sorry. There is no separate issue about that.
> >
> > Uwe
> >
> > -----
> > Uwe Schindler
> > H.-H.-Meier-Allee 63, D-28213 Bremen
> > http://www.thetaphi.de
> > eMail: uwe@thetaphi.de
> >
> > > -----Original Message-----
> > > From: Markus Jelsma [mailto:markus.jelsma@openindex.io]
> > > Sent: Wednesday, September 21, 2016c 12:31 PM
> > > To: java-user@lucene.apache.org
> > > Subject: Upgrade 6.2.x Char* API's
> > >
> > > Hello - upgrading one of our libraries to 6.2.0 failed due to LUCENE-7318.
> This
> > > is fixed nicely on 6.2.1, many thanks for that!
> > >
> > > Upgrading to 6.2.1, however, still raises compile errors. I haven't seen any
> > > notice of this in CHANGES.txt or its API changes section for both 6.2.x
> > > versions. Any tips on how to migrate the two following issues?
> > >
> > > incompatible types: org.apache.lucene.analysis.CharArraySet cannot be
> > > converted to org.apache.lucene.analysis.util.CharArraySet
> > >
> > > and
> > >
> > > cannot find symbol
> > > [ERROR] symbol:   class CharacterUtils
> > > [ERROR] location: package org.apache.lucene.analysis.util
> > >
> > > Is there a Jira a have missed?
> > >
> > > Many thanks,
> > > Markus
> > >
> > > ---------------------------------------------------------------------
> > > 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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message