[jira] [Comment Edited] (LUCENE-10558) Expose IOSupplier constructors in Kuromoji (and Nori?)

2022-05-04 Thread Tomoko Uchida (Jira)


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

Tomoko Uchida edited comment on LUCENE-10558 at 5/5/22 5:10 AM:


Or, I'm also fine with keeping backward compatibility for 9.x. The deprecated 
constructor has been removed in main branch so you'd eventually have to change 
the application code, but you can delay the migration until 10.0.

The old implementation wouldn't be module-compatible I think, it'd still work 
on class-path mode (maybe we'd need a note about it).

I'd agree with using the new constructor with IOSupplier is a cleaner solution.


was (Author: tomoko uchida):
Or, I'm also fine with keeping backward compatibility for 9.x. The deprecated 
constructor has been removed in main branch so you'd eventually have to change 
the application code, but you can delay the migration until 10.0.

> Expose IOSupplier constructors in Kuromoji (and Nori?)
> ---
>
> Key: LUCENE-10558
> URL: https://issues.apache.org/jira/browse/LUCENE-10558
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Michael Sokolov
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When we refactored the constructors for  these resource objects used by the 
> kuromoji JapaneseTokenizer,  we (inadvertently, I expect) changed the 
> behavior for consumers that were supplying these resources on the classpath. 
> In that case, we silently replaced the custom resources with the Lucene 
> built-in ones.  I think we cannot support the old API because of Java Module 
> system restrictions, but we didn't provide any usable replacement or notice 
> either.
>  
> This issue is for exposing the new (private) constructors that accept 
> streams, and adding a notice to Migration.md to point users at them, since 
> they can be used with resources streams loaded from the classpath by the 
> caller.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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



[jira] [Comment Edited] (LUCENE-10558) Expose IOSupplier constructors in Kuromoji (and Nori?)

2022-05-04 Thread Tomoko Uchida (Jira)


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

Tomoko Uchida edited comment on LUCENE-10558 at 5/5/22 4:18 AM:


Or, I'm also fine with keeping backward compatibility for 9.x. The deprecated 
constructor has been removed in main branch so you'd eventually have to change 
the application code, but you can delay the migration until 10.0.


was (Author: tomoko uchida):
Or, I'm also fine with keeping backward compatibility for 9.x. The deprecated 
constructor has been removed in main branch so you'd have to change the 
application code, but you can delay the migration until 10.0.

> Expose IOSupplier constructors in Kuromoji (and Nori?)
> ---
>
> Key: LUCENE-10558
> URL: https://issues.apache.org/jira/browse/LUCENE-10558
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Michael Sokolov
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When we refactored the constructors for  these resource objects used by the 
> kuromoji JapaneseTokenizer,  we (inadvertently, I expect) changed the 
> behavior for consumers that were supplying these resources on the classpath. 
> In that case, we silently replaced the custom resources with the Lucene 
> built-in ones.  I think we cannot support the old API because of Java Module 
> system restrictions, but we didn't provide any usable replacement or notice 
> either.
>  
> This issue is for exposing the new (private) constructors that accept 
> streams, and adding a notice to Migration.md to point users at them, since 
> they can be used with resources streams loaded from the classpath by the 
> caller.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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



[jira] [Comment Edited] (LUCENE-10558) Expose IOSupplier constructors in Kuromoji (and Nori?)

2022-05-04 Thread Michael Sokolov (Jira)


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

Michael Sokolov edited comment on LUCENE-10558 at 5/4/22 9:53 PM:
--

Hi [~uschindler] – we have code like this:

 

 

{{ connectionCosts = new ConnectionCosts(ResourceScheme.CLASSPATH, 
DICTIONARY_PATH + "/ConnectionCosts");}}
{{ systemDictionary = new TokenInfoDictionary(ResourceScheme.CLASSPATH, 
DICTIONARY_PATH + "/TokenInfoDictionary");}}
{{ unknownDictionary = new UnknownDictionary(ResourceScheme.CLASSPATH, 
DICTIONARY_PATH + "/UnknownDictionary");}}

{{ japaneseTokenizer = new JapaneseTokenizer(attributeFactory, 
systemDictionary,}}
{{                unknownDictionary, connectionCosts, userDict, 
getDiscardPunctuationSetting(context),}}
{{                false, mode);}}
 

 

Those resource constructors started ignoring the paths we passed  in 9.1


was (Author: sokolov):
Hi [~uschindler] – we have code like this:

 

 

{{ connectionCosts = new ConnectionCosts(ResourceScheme.CLASSPATH, 
DICTIONARY_PATH + "/ConnectionCosts");}}
{{ systemDictionary = new TokenInfoDictionary(ResourceScheme.CLASSPATH, 
DICTIONARY_PATH + "/TokenInfoDictionary");}}
{{ unknownDictionary = new UnknownDictionary(ResourceScheme.CLASSPATH, 
DICTIONARY_PATH + "/UnknownDictionary");}}

{{ japaneseTokenizer = new JapaneseTokenizer(attributeFactory, 
systemDictionary,}}
{{                unknownDictionary, connectionCosts, userDict, 
getDiscardPunctuationSetting(context),}}
{{                false, mode);}}
  

 

It stops using those custom resources in 9.1

> Expose IOSupplier constructors in Kuromoji (and Nori?)
> ---
>
> Key: LUCENE-10558
> URL: https://issues.apache.org/jira/browse/LUCENE-10558
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Michael Sokolov
>Priority: Major
>
> When we refactored the constructors for  these resource objects used by the 
> kuromoji JapaneseTokenizer,  we (inadvertently, I expect) changed the 
> behavior for consumers that were supplying these resources on the classpath. 
> In that case, we silently replaced the custom resources with the Lucene 
> built-in ones.  I think we cannot support the old API because of Java Module 
> system restrictions, but we didn't provide any usable replacement or notice 
> either.
>  
> This issue is for exposing the new (private) constructors that accept 
> streams, and adding a notice to Migration.md to point users at them, since 
> they can be used with resources streams loaded from the classpath by the 
> caller.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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



[jira] [Comment Edited] (LUCENE-10558) Expose IOSupplier constructors in Kuromoji (and Nori?)

2022-05-04 Thread Michael Sokolov (Jira)


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

Michael Sokolov edited comment on LUCENE-10558 at 5/4/22 9:52 PM:
--

Hi [~uschindler] – we have code like this:

 

 

{{ connectionCosts = new ConnectionCosts(ResourceScheme.CLASSPATH, 
DICTIONARY_PATH + "/ConnectionCosts");}}
{{ systemDictionary = new TokenInfoDictionary(ResourceScheme.CLASSPATH, 
DICTIONARY_PATH + "/TokenInfoDictionary");}}
{{ unknownDictionary = new UnknownDictionary(ResourceScheme.CLASSPATH, 
DICTIONARY_PATH + "/UnknownDictionary");}}

{{ japaneseTokenizer = new JapaneseTokenizer(attributeFactory, 
systemDictionary,}}
{{                unknownDictionary, connectionCosts, userDict, 
getDiscardPunctuationSetting(context),}}
{{                false, mode);}}
  

 

It stops using those custom resources in 9.1


was (Author: sokolov):
Hi [~uschindler] – we have code like this:

 

{{

            connectionCosts = new ConnectionCosts(ResourceScheme.CLASSPATH, 
DICTIONARY_PATH + "/ConnectionCosts");
            systemDictionary = new 
TokenInfoDictionary(ResourceScheme.CLASSPATH, DICTIONARY_PATH + 
"/TokenInfoDictionary");
            unknownDictionary = new UnknownDictionary(ResourceScheme.CLASSPATH, 
DICTIONARY_PATH + "/UnknownDictionary");

            japaneseTokenizer = new JapaneseTokenizer(attributeFactory, 
systemDictionary,
                unknownDictionary, connectionCosts, userDict, 
getDiscardPunctuationSetting(context),
                false, mode);
        }}

 

It stops using those custom resources in 9.1

> Expose IOSupplier constructors in Kuromoji (and Nori?)
> ---
>
> Key: LUCENE-10558
> URL: https://issues.apache.org/jira/browse/LUCENE-10558
> Project: Lucene - Core
>  Issue Type: Improvement
>Reporter: Michael Sokolov
>Priority: Major
>
> When we refactored the constructors for  these resource objects used by the 
> kuromoji JapaneseTokenizer,  we (inadvertently, I expect) changed the 
> behavior for consumers that were supplying these resources on the classpath. 
> In that case, we silently replaced the custom resources with the Lucene 
> built-in ones.  I think we cannot support the old API because of Java Module 
> system restrictions, but we didn't provide any usable replacement or notice 
> either.
>  
> This issue is for exposing the new (private) constructors that accept 
> streams, and adding a notice to Migration.md to point users at them, since 
> they can be used with resources streams loaded from the classpath by the 
> caller.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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