[ 
https://issues.apache.org/jira/browse/LUCENE-9317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17082387#comment-17082387
 ] 

Tomoko Uchida commented on LUCENE-9317:
---------------------------------------

Thanks for your investigation.
{quote}IndexWriterConfig has a default constructor that uses StandardAnalyzer. 
I deleted this constructor and updated the test cases that were using this 
constructor.
{quote}
While breaking changes in public APIs are certainly okay for a major version 
upgrade and this is a good clean-up, it might have a major impact on 
applications (though I don't use this no-arg default constructor) ?
 As a possible direction, instead of removing o.a.l.a.standard from "core" we 
could take inverted strategy - move o.a.l.a.standard.StandardTokenizerFactory 
to "core" from "analyzers-common" and rename the "o.a.l.a.standard" package in 
"analyzers-common" (for example, "o.a.l.a.classic"). It should be possible if 
we also move analysis factory bases and the SPILoader staff to "core". From my 
personal point of view, it would be a good idea that we have a default, 
concrete Analyzer/Tokenizer in "core" for both of convenience and reference 
implementation. But I may be wrong and would like to hear thoughts / opinions 
from others.

// cc [~mikemccand] [~uschindler]
{quote}There were also some test cases that were using StandardAnalyzer, I 
updated the test cases to use the MockAnalyzer instead. The TestIntervals test 
case failed when using the MockAnalyzer. I'll need to have a closer look at 
this particular test case to understand why it is failing.
{quote}
Does the test always fail? MockAnalyzer has a random state that varies on every 
test execution. If the test fails "sometimes", you can also share the "seed" 
value that may cause the problematic situation; the seed value is printed in 
the terminal when failing the test.

> Resolve package name conflicts for StandardAnalyzer to allow Java module 
> system support
> ---------------------------------------------------------------------------------------
>
>                 Key: LUCENE-9317
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9317
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/other
>    Affects Versions: master (9.0)
>            Reporter: David Ryan
>            Priority: Major
>              Labels: build, features
>
>  
> To allow Lucene to be modularised there are a few preparatory tasks to be 
> completed prior to this being possible.  The Java module system requires that 
> jars do not use the same package name in different jars.  The lucene-core and 
> lucene-analyzers-common both share the package 
> org.apache.lucene.analysis.standard.
> Possible resolutions to this issue are discussed by Uwe on the mailing list 
> here:
>  
> [http://mail-archives.apache.org/mod_mbox/lucene-dev/202004.mbox/%3CCAM21Rt8FHOq_JeUSELhsQJH0uN0eKBgduBQX4fQKxbs49TLqzA%40mail.gmail.com%3E]????
> {quote}About StandardAnalyzer: Unfortunately I aggressively complained a 
> while back when Mike McCandless wanted to move standard analyzer out of the 
> analysis package into core (“for convenience”). This was a bad step, and IMHO 
> we should revert that or completely rename the packages and everything. The 
> problem here is: As the analysis services are only part of lucene-analyzers, 
> we had to leave the factory classes there, but move the implementation 
> classes in core. The package has to be the same. The only way around that is 
> to move the analysis factory framework also to core (I would not be against 
> that). This would include all factory base classes and the service loading 
> stuff. Then we can move standard analyzer and some of the filters/tokenizers 
> including their factories to core an that problem would be solved.
> {quote}
> There are two options here, either move factory framework into core or revert 
> StandardAnalyzer back to lucene-analyzers.  In the email, the solution lands 
> on reverting back as per the task list:
> {quote}Add some preparatory issues to cleanup class hierarchy: Move Analysis 
> SPI to core / remove StandardAnalyzer and related classes out of core back to 
> anaysis
> {quote}
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to