[jira] [Commented] (SOLR-9154) Config API does not work when adding a component with DirectSolrSpellChecker

2017-01-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-9154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15793296#comment-15793296
 ] 

ASF subversion and git services commented on SOLR-9154:
---

Commit fb39e397dbd17fea68f5d46baf80f5af8f5b59d0 in lucene-solr's branch 
refs/heads/branch_6x from anshum
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fb39e39 ]

SOLR-9154: Fix DirectSolrSpellChecker to work when added through the Config API


> Config API does not work when adding a component with DirectSolrSpellChecker
> 
>
> Key: SOLR-9154
> URL: https://issues.apache.org/jira/browse/SOLR-9154
> Project: Solr
>  Issue Type: Bug
>  Components: config-api, spellchecker
>Reporter: Anshum Gupta
>Assignee: Anshum Gupta
> Fix For: master (7.0), 6.4
>
> Attachments: SOLR-9154.patch, SOLR-9154.patch
>
>
> When trying to add a DirectSolrSpellchecker using the Config API (JSON), 
> there seems to be a loss of information w.r.t the param types. The accuracy 
> field, only in this specific case needs to be defined as a float it seems. 
> While this is possible when updating the solrconfig,xml directly, the field 
> type (float) can not be specified using JSON. 
> Here are the steps to reproduce this issue:
> {code}
> #Bootstrapping
> bin/solr start -c
> bin/solr create -c foo
> bin/post -c foo example/exampledocs/books.csv
> #Add spell checker - This would hang and the logs contain recurring 
> exceptions as mentioned below
> curl http://localhost:8983/solr/foo/config -H 'Content-type:application/json' 
> -d '{"update-searchcomponent": {"name":"spellcheck",   
> "class":"solr.SpellCheckComponent",   "spellchecker":[ { 
> "name":"text_index_dictionary", "field":"text", 
> "classname":"solr.DirectSolrSpellChecker", 
> "distanceMeasure":"org.apache.lucene.search.spell.LevensteinDistance", 
> "accuracy":0.5, "maxEdits":2, "minPrefix":1, "maxInspections":5, 
> "minQueryLength":4, "maxQueryFrequency":0.001, 
> "thresholdTokenFrequency":0.01}]}}'
> {code}
> Log:
> {code}
> 2016-05-24 04:08:44.371 ERROR (SolrConfigHandler-refreshconf) [c:foo s:shard1 
> r:core_node1 x:foo_shard1_replica1] o.a.s.h.SolrConfigHandler Unable to 
> refresh conf 
> org.apache.solr.common.SolrException: Unable to reload core 
> [foo_shard1_replica1]
>   at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:944)
>   at 
> org.apache.solr.core.SolrCore.lambda$getConfListener$7(SolrCore.java:2510)
>   at 
> org.apache.solr.handler.SolrConfigHandler$Command$1.run(SolrConfigHandler.java:218)
> Caused by: org.apache.solr.common.SolrException: java.lang.Double cannot be 
> cast to java.lang.Float
>   at org.apache.solr.core.SolrCore.(SolrCore.java:773)
>   at org.apache.solr.core.SolrCore.reload(SolrCore.java:462)
>   at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:938)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (SOLR-9154) Config API does not work when adding a component with DirectSolrSpellChecker

2017-01-01 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-9154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15791960#comment-15791960
 ] 

ASF subversion and git services commented on SOLR-9154:
---

Commit 93562da610bf8756351be7720c69872bc1cea727 in lucene-solr's branch 
refs/heads/master from anshum
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=93562da ]

SOLR-9154: Fix DirectSolrSpellChecker to work when added through the Config API


> Config API does not work when adding a component with DirectSolrSpellChecker
> 
>
> Key: SOLR-9154
> URL: https://issues.apache.org/jira/browse/SOLR-9154
> Project: Solr
>  Issue Type: Bug
>  Components: config-api, spellchecker
>Reporter: Anshum Gupta
>Assignee: Anshum Gupta
> Fix For: 6.2, master (7.0)
>
> Attachments: SOLR-9154.patch, SOLR-9154.patch
>
>
> When trying to add a DirectSolrSpellchecker using the Config API (JSON), 
> there seems to be a loss of information w.r.t the param types. The accuracy 
> field, only in this specific case needs to be defined as a float it seems. 
> While this is possible when updating the solrconfig,xml directly, the field 
> type (float) can not be specified using JSON. 
> Here are the steps to reproduce this issue:
> {code}
> #Bootstrapping
> bin/solr start -c
> bin/solr create -c foo
> bin/post -c foo example/exampledocs/books.csv
> #Add spell checker - This would hang and the logs contain recurring 
> exceptions as mentioned below
> curl http://localhost:8983/solr/foo/config -H 'Content-type:application/json' 
> -d '{"update-searchcomponent": {"name":"spellcheck",   
> "class":"solr.SpellCheckComponent",   "spellchecker":[ { 
> "name":"text_index_dictionary", "field":"text", 
> "classname":"solr.DirectSolrSpellChecker", 
> "distanceMeasure":"org.apache.lucene.search.spell.LevensteinDistance", 
> "accuracy":0.5, "maxEdits":2, "minPrefix":1, "maxInspections":5, 
> "minQueryLength":4, "maxQueryFrequency":0.001, 
> "thresholdTokenFrequency":0.01}]}}'
> {code}
> Log:
> {code}
> 2016-05-24 04:08:44.371 ERROR (SolrConfigHandler-refreshconf) [c:foo s:shard1 
> r:core_node1 x:foo_shard1_replica1] o.a.s.h.SolrConfigHandler Unable to 
> refresh conf 
> org.apache.solr.common.SolrException: Unable to reload core 
> [foo_shard1_replica1]
>   at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:944)
>   at 
> org.apache.solr.core.SolrCore.lambda$getConfListener$7(SolrCore.java:2510)
>   at 
> org.apache.solr.handler.SolrConfigHandler$Command$1.run(SolrConfigHandler.java:218)
> Caused by: org.apache.solr.common.SolrException: java.lang.Double cannot be 
> cast to java.lang.Float
>   at org.apache.solr.core.SolrCore.(SolrCore.java:773)
>   at org.apache.solr.core.SolrCore.reload(SolrCore.java:462)
>   at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:938)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (SOLR-9154) Config API does not work when adding a component with DirectSolrSpellChecker

2016-07-02 Thread David Smiley (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-9154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15360313#comment-15360313
 ] 

David Smiley commented on SOLR-9154:


bq. Would it be possible to convert the config variable to a SolrParams (e.g.: 
using SolrParams.toSolrParams)? This way you could use get* methods instead of 
parsing the string yourself.

+1 -- I've often felt the annoying differences between NamedList and SolrParams 
for the simple name=value cases.  A convenience method on NamedList 
{{toSolrParams()}} would make this more obvious.  These initializers could be 
updated to use SolrParams instead.  That's obviously a bigger refactoring & 
scope change than just the spellchecker, but it seems inevitable something 
broader than just this patch should get done as it's inevitable this same bug 
pattern will appear again!

Another possible change, possibly simpler, is to have NamedList have 
getFloatVal, getDoubleVal, getStringVal, getIntVal, getLongVal.  It already has 
getBooleanArg which is named poorly (IMO).  And then, update everyone to use 
these rather than getVal.  These added methods could do float/double 
conversions, treating them equivalently.  Maybe String parsing too.

> Config API does not work when adding a component with DirectSolrSpellChecker
> 
>
> Key: SOLR-9154
> URL: https://issues.apache.org/jira/browse/SOLR-9154
> Project: Solr
>  Issue Type: Bug
>  Components: config-api, spellchecker
>Reporter: Anshum Gupta
>Assignee: Anshum Gupta
> Fix For: 6.2, master (7.0)
>
> Attachments: SOLR-9154.patch
>
>
> When trying to add a DirectSolrSpellchecker using the Config API (JSON), 
> there seems to be a loss of information w.r.t the param types. The accuracy 
> field, only in this specific case needs to be defined as a float it seems. 
> While this is possible when updating the solrconfig,xml directly, the field 
> type (float) can not be specified using JSON. 
> Here are the steps to reproduce this issue:
> {code}
> #Bootstrapping
> bin/solr start -c
> bin/solr create -c foo
> bin/post -c foo example/exampledocs/books.csv
> #Add spell checker - This would hang and the logs contain recurring 
> exceptions as mentioned below
> curl http://localhost:8983/solr/foo/config -H 'Content-type:application/json' 
> -d '{"update-searchcomponent": {"name":"spellcheck",   
> "class":"solr.SpellCheckComponent",   "spellchecker":[ { 
> "name":"text_index_dictionary", "field":"text", 
> "classname":"solr.DirectSolrSpellChecker", 
> "distanceMeasure":"org.apache.lucene.search.spell.LevensteinDistance", 
> "accuracy":0.5, "maxEdits":2, "minPrefix":1, "maxInspections":5, 
> "minQueryLength":4, "maxQueryFrequency":0.001, 
> "thresholdTokenFrequency":0.01}]}}'
> {code}
> Log:
> {code}
> 2016-05-24 04:08:44.371 ERROR (SolrConfigHandler-refreshconf) [c:foo s:shard1 
> r:core_node1 x:foo_shard1_replica1] o.a.s.h.SolrConfigHandler Unable to 
> refresh conf 
> org.apache.solr.common.SolrException: Unable to reload core 
> [foo_shard1_replica1]
>   at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:944)
>   at 
> org.apache.solr.core.SolrCore.lambda$getConfListener$7(SolrCore.java:2510)
>   at 
> org.apache.solr.handler.SolrConfigHandler$Command$1.run(SolrConfigHandler.java:218)
> Caused by: org.apache.solr.common.SolrException: java.lang.Double cannot be 
> cast to java.lang.Float
>   at org.apache.solr.core.SolrCore.(SolrCore.java:773)
>   at org.apache.solr.core.SolrCore.reload(SolrCore.java:462)
>   at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:938)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (SOLR-9154) Config API does not work when adding a component with DirectSolrSpellChecker

2016-06-29 Thread Alex D (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-9154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15355332#comment-15355332
 ] 

Alex D commented on SOLR-9154:
--

Would it be possible to convert the config variable to a SolrParams (e.g.: 
using SolrParams.toSolrParams)?  This way you could use getField* methods 
instead of parsing the string yourself.

> Config API does not work when adding a component with DirectSolrSpellChecker
> 
>
> Key: SOLR-9154
> URL: https://issues.apache.org/jira/browse/SOLR-9154
> Project: Solr
>  Issue Type: Bug
>  Components: config-api, spellchecker
>Reporter: Anshum Gupta
>Assignee: Anshum Gupta
> Fix For: 6.2, master (7.0)
>
> Attachments: SOLR-9154.patch
>
>
> When trying to add a DirectSolrSpellchecker using the Config API (JSON), 
> there seems to be a loss of information w.r.t the param types. The accuracy 
> field, only in this specific case needs to be defined as a float it seems. 
> While this is possible when updating the solrconfig,xml directly, the field 
> type (float) can not be specified using JSON. 
> Here are the steps to reproduce this issue:
> {code}
> #Bootstrapping
> bin/solr start -c
> bin/solr create -c foo
> bin/post -c foo example/exampledocs/books.csv
> #Add spell checker - This would hang and the logs contain recurring 
> exceptions as mentioned below
> curl http://localhost:8983/solr/foo/config -H 'Content-type:application/json' 
> -d '{"update-searchcomponent": {"name":"spellcheck",   
> "class":"solr.SpellCheckComponent",   "spellchecker":[ { 
> "name":"text_index_dictionary", "field":"text", 
> "classname":"solr.DirectSolrSpellChecker", 
> "distanceMeasure":"org.apache.lucene.search.spell.LevensteinDistance", 
> "accuracy":0.5, "maxEdits":2, "minPrefix":1, "maxInspections":5, 
> "minQueryLength":4, "maxQueryFrequency":0.001, 
> "thresholdTokenFrequency":0.01}]}}'
> {code}
> Log:
> {code}
> 2016-05-24 04:08:44.371 ERROR (SolrConfigHandler-refreshconf) [c:foo s:shard1 
> r:core_node1 x:foo_shard1_replica1] o.a.s.h.SolrConfigHandler Unable to 
> refresh conf 
> org.apache.solr.common.SolrException: Unable to reload core 
> [foo_shard1_replica1]
>   at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:944)
>   at 
> org.apache.solr.core.SolrCore.lambda$getConfListener$7(SolrCore.java:2510)
>   at 
> org.apache.solr.handler.SolrConfigHandler$Command$1.run(SolrConfigHandler.java:218)
> Caused by: org.apache.solr.common.SolrException: java.lang.Double cannot be 
> cast to java.lang.Float
>   at org.apache.solr.core.SolrCore.(SolrCore.java:773)
>   at org.apache.solr.core.SolrCore.reload(SolrCore.java:462)
>   at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:938)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (SOLR-9154) Config API does not work when adding a component with DirectSolrSpellChecker

2016-05-25 Thread Anshum Gupta (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-9154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15300599#comment-15300599
 ] 

Anshum Gupta commented on SOLR-9154:


Seems like all assignments have issues in the init method for this class. This 
was the first one so this is all that got hit and logged.
I'll work on a patch.

> Config API does not work when adding a component with DirectSolrSpellChecker
> 
>
> Key: SOLR-9154
> URL: https://issues.apache.org/jira/browse/SOLR-9154
> Project: Solr
>  Issue Type: Bug
>  Components: config-api, spellchecker
>Reporter: Anshum Gupta
>
> When trying to add a DirectSolrSpellchecker using the Config API (JSON), 
> there seems to be a loss of information w.r.t the param types. The accuracy 
> field, only in this specific case needs to be defined as a float it seems. 
> While this is possible when updating the solrconfig,xml directly, the field 
> type (float) can not be specified using JSON. 
> Here are the steps to reproduce this issue:
> {code}
> #Bootstrapping
> bin/solr start -c
> bin/solr create -c foo
> bin/post -c foo example/exampledocs/books.csv
> #Add spell checker - This would hang and the logs contain recurring 
> exceptions as mentioned below
> curl http://localhost:8983/solr/foo/config -H 'Content-type:application/json' 
> -d '{"update-searchcomponent": {"name":"spellcheck",   
> "class":"solr.SpellCheckComponent",   "spellchecker":[ { 
> "name":"text_index_dictionary", "field":"text", 
> "classname":"solr.DirectSolrSpellChecker", 
> "distanceMeasure":"org.apache.lucene.search.spell.LevensteinDistance", 
> "accuracy":0.5, "maxEdits":2, "minPrefix":1, "maxInspections":5, 
> "minQueryLength":4, "maxQueryFrequency":0.001, 
> "thresholdTokenFrequency":0.01}]}}'
> {code}
> Log:
> {code}
> 2016-05-24 04:08:44.371 ERROR (SolrConfigHandler-refreshconf) [c:foo s:shard1 
> r:core_node1 x:foo_shard1_replica1] o.a.s.h.SolrConfigHandler Unable to 
> refresh conf 
> org.apache.solr.common.SolrException: Unable to reload core 
> [foo_shard1_replica1]
>   at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:944)
>   at 
> org.apache.solr.core.SolrCore.lambda$getConfListener$7(SolrCore.java:2510)
>   at 
> org.apache.solr.handler.SolrConfigHandler$Command$1.run(SolrConfigHandler.java:218)
> Caused by: org.apache.solr.common.SolrException: java.lang.Double cannot be 
> cast to java.lang.Float
>   at org.apache.solr.core.SolrCore.(SolrCore.java:773)
>   at org.apache.solr.core.SolrCore.reload(SolrCore.java:462)
>   at org.apache.solr.core.CoreContainer.reload(CoreContainer.java:938)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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