lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anshum Gupta (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-9154) Config API does not work when adding a component with DirectSolrSpellChecker
Date Wed, 25 May 2016 19:31:13 GMT

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

Anshum Gupta updated SOLR-9154:
-------------------------------
    Attachment: SOLR-9154.patch

I'm not purely convinced with the patch but this works. If someone has a better idea, feel
free to suggest, else I'll commit this after adding a test.

> 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
>             Fix For: 6.1
>
>         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.<init>(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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message