swissbib / vufind

A library resource discovery portal designed and developed for libraries by libraries
GNU General Public License v2.0
12 stars 7 forks source link

Spellcheck query bei Bindestrich und Umlaut #658

Closed witzigs closed 5 years ago

witzigs commented 5 years ago

Wenn bei einem Suchbegriff mit Bindestrich und Umlaut keine Treffer gefunden werden, ergibt die danach ausgelöste Spellcheck Query einen Fehler 500.

Beispiele: ss-jagdverbände modell-eisenbähn der logik-verführer drösser

liowalter commented 5 years ago

The Solr query is the following

http://localhost:8984/solr/bb/select?fl=%2A%2Cscore&facet=true&facet.limit=100&facet.field=%7B%21ex%3De_institution_str_mv_filter%7De_institution_str_mv&facet.field=%7B%21ex%3Dinstitution_filter%7Dinstitution&facet.field=navSub_orange&facet.field=%7B%21ex%3DnavAuthor_orange_filter%7DnavAuthor_orange&facet.field=%7B%21ex%3Dformat_hierarchy_str_mv_filter%7Dformat_hierarchy_str_mv&facet.field=%7B%21ex%3Dlanguage_filter%7Dlanguage&facet.field=%7B%21ex%3DnavSubform_filter%7DnavSubform&facet.field=publishDate&facet.sort=count&facet.mincount=1&sort=score+desc&q.op=AND&hl=true&hl.simple.pre=%7B%7B%7B%7BSTART_HILITE%7D%7D%7D%7D&hl.simple.post=%7B%7B%7B%7BEND_HILITE%7D%7D%7D%7D&spellcheck=true&spellcheck.dictionary=default&hl.fl=fulltext&hl.fl=0%2Cauthor%2Cauthor_additional%2Cauthor_additional_dsv11_txt_mv%2Cauthor_additional_gnd_txt_mv%2Cseries%2Ctopic%2Caddfields_txt_mv%2Cpublplace_txt_mv%2Cpublplace_dsv11_txt_mv%2Cpublplace_gnd_txt_mv%2Cfulltext%2Clocalcode%2Ctitle_short%2Ctitle_alt%2Ctitle%2Ctitle_sub%2Ctitle_old%2Ctitle_new%2Ctitle_additional_dsv11_txt_mv%2Ctitle_additional_gnd_txt_mv%2Cpublplace_additional_gnd_txt_mv%2Ccallnumber%2Cctrlnum%2CpublishDate%2Cisbn%2Ccancisbn_isn_mv%2Cvariant_isbn_isn_mv%2Cissn%2Cincoissn_isn_mv%2Cid&hl.fragsize=250&wt=json&json.nl=arrarr&rows=20&start=0&spellcheck.q=modell-eisenb%C3%A4hn&qf=title_short%5E1000+title_alt%5E200+title%5E200+title_sub%5E200+title_old%5E200+title_new%5E200+author%5E750+author_additional%5E100+author_additional_dsv11_txt_mv%5E100+title_additional_dsv11_txt_mv%5E100+author_additional_gnd_txt_mv%5E100+title_additional_gnd_txt_mv%5E100+publplace_additional_gnd_txt_mv%5E100+series%5E200+topic%5E500+addfields_txt_mv%5E50+publplace_txt_mv%5E25+publplace_dsv11_txt_mv%5E25+fulltext+callnumber%5E1000+ctrlnum%5E1000+publishDate+isbn+cancisbn_isn_mv+variant_isbn_isn_mv+issn+incoissn_isn_mv+localcode+id&qt=edismax&pf=title_short%5E1000&ps=2&bf=recip%28abs%28ms%28NOW%2FDAY%2Cfreshness%29%29%2C3.16e-10%2C100%2C100%29&mm=0%25&q=modell-eisenb%C3%A4hn

SOLR returns an error for this :

{
"responseHeader": {
"zkConnected": true,
"status": 500,
"QTime": 73,
"params": {
"spellcheck.dictionary": "default",
"ps": "2",
"hl": "true",
"bf": "recip(abs(ms(NOW/DAY,freshness)),3.16e-10,100,100)",
"fl": "*,score",
"hl.fragsize": "250",
"q.op": "AND",
"hl.simple.pre": "{{{{START_HILITE}}}}",
"spellcheck.q": "modell-eisenbähn",
"qf": "title_short^1000 title_alt^200 title^200 title_sub^200 title_old^200 title_new^200 author^750 author_additional^100 author_additional_dsv11_txt_mv^100 title_additional_dsv11_txt_mv^100 author_additional_gnd_txt_mv^100 title_additional_gnd_txt_mv^100 publplace_additional_gnd_txt_mv^100 series^200 topic^500 addfields_txt_mv^50 publplace_txt_mv^25 publplace_dsv11_txt_mv^25 fulltext callnumber^1000 ctrlnum^1000 publishDate isbn cancisbn_isn_mv variant_isbn_isn_mv issn incoissn_isn_mv localcode id",
"hl.fl": [
"fulltext",
"0,author,author_additional,author_additional_dsv11_txt_mv,author_additional_gnd_txt_mv,series,topic,addfields_txt_mv,publplace_txt_mv,publplace_dsv11_txt_mv,publplace_gnd_txt_mv,fulltext,localcode,title_short,title_alt,title,title_sub,title_old,title_new,title_additional_dsv11_txt_mv,title_additional_gnd_txt_mv,publplace_additional_gnd_txt_mv,callnumber,ctrlnum,publishDate,isbn,cancisbn_isn_mv,variant_isbn_isn_mv,issn,incoissn_isn_mv,id"
],
"wt": "json",
"mm": "0%",
"facet.field": [
"{!ex=e_institution_str_mv_filter}e_institution_str_mv",
"{!ex=institution_filter}institution",
"navSub_orange",
"{!ex=navAuthor_orange_filter}navAuthor_orange",
"{!ex=format_hierarchy_str_mv_filter}format_hierarchy_str_mv",
"{!ex=language_filter}language",
"{!ex=navSubform_filter}navSubform",
"publishDate"
],
"qt": "edismax",
"json.nl": "arrarr",
"start": "0",
"sort": "score desc",
"rows": "20",
"facet.limit": "100",
"q": "modell-eisenbähn",
"hl.simple.post": "{{{{END_HILITE}}}}",
"spellcheck": "true",
"pf": "title_short^1000",
"facet.mincount": "1",
"facet": "true",
"facet.sort": "count"
}
},
"error": {
"metadata": [
[
"error-class",
"org.apache.solr.common.SolrException"
],
[
"root-error-class",
"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException"
]
],
"msg": "org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request:[http://131.152.230.33:8080/solr/bb_shard2_replica_n8, http://131.152.230.32:8080/solr/bb_shard2_replica_n6, http://131.152.230.32:8080/solr/bb_shard1_replica_n1, http://131.152.230.33:8080/solr/bb_shard1_replica_n2, http://131.152.230.34:8080/solr/bb_shard1_replica_n4, http://131.152.230.34:8080/solr/bb_shard2_replica_n10]",
"trace": "org.apache.solr.common.SolrException: org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request:[http://131.152.230.33:8080/solr/bb_shard2_replica_n8, http://131.152.230.32:8080/solr/bb_shard2_replica_n6, http://131.152.230.32:8080/solr/bb_shard1_replica_n1, http://131.152.230.33:8080/solr/bb_shard1_replica_n2, http://131.152.230.34:8080/solr/bb_shard1_replica_n4, http://131.152.230.34:8080/solr/bb_shard2_replica_n10]\n\tat org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:410)\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:195)\n\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:2503)\n\tat org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:711)\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:517)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:384)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:330)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:530)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)\n\tat org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)\n\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request:[http://131.152.230.33:8080/solr/bb_shard2_replica_n8, http://131.152.230.32:8080/solr/bb_shard2_replica_n6, http://131.152.230.32:8080/solr/bb_shard1_replica_n1, http://131.152.230.33:8080/solr/bb_shard1_replica_n2, http://131.152.230.34:8080/solr/bb_shard1_replica_n4, http://131.152.230.34:8080/solr/bb_shard2_replica_n10]\n\tat org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:462)\n\tat org.apache.solr.handler.component.HttpShardHandlerFactory.makeLoadBalancedRequest(HttpShardHandlerFactory.java:273)\n\tat org.apache.solr.handler.component.HttpShardHandler.lambda$submit$0(HttpShardHandler.java:175)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)\n\tat org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:188)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\t... 1 more\nCaused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://131.152.230.34:8080/solr/bb_shard1_replica_n4: String index out of range: -10\n\tat org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:643)\n\tat org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255)\n\tat org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244)\n\tat org.apache.solr.client.solrj.impl.LBHttpSolrClient.doRequest(LBHttpSolrClient.java:483)\n\tat org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:436)\n\t... 10 more\n",
"code": 500
}
}
guenterh commented 5 years ago

@liowalter I took a short look into this and "googled" for this error message ard4_replica_n14: String index out of range: -10\n\tat where I found this https://issues.apache.org/jira/browse/SOLR-4489 Although this issue is closed a long time ago perhaps we are still using a wrong configuration since we jumped from version 4 to 7? Another nice message in the exception stack: )\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)\n\tat :)

liowalter commented 5 years ago

fixed with https://github.com/swissbib/searchconf/commit/15cb9f7ce9ae3fa8a1f1ee53131a9b23307b00fd