lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Bodart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-12370) NullPointerException on MoreLikeThisComponent
Date Sun, 08 Jul 2018 22:01:00 GMT

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

Gilles Bodart commented on SOLR-12370:
--------------------------------------

Thanks for the explanation, but, for me, a npe is always a bug, we should have an explicit
exception that tells us that we use the feature in a wrong way ... But I agree that's a question
of point of view :)
The issue I had was that I was using a third party library that implement the solr api and
we weren't able to target other endpoints. In another hand, we have the hand on the schema
of the solr :)

> NullPointerException on MoreLikeThisComponent
> ---------------------------------------------
>
>                 Key: SOLR-12370
>                 URL: https://issues.apache.org/jira/browse/SOLR-12370
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: MoreLikeThis
>    Affects Versions: 7.3.1
>            Reporter: Gilles Bodart
>            Priority: Major
>
> I'm trying to use the MoreLikeThis component under a suggest call, but I receive a npe
every time (here's the stacktrace)
> {code:java}
> java.lang.NullPointerException
> at org.apache.solr.handler.component.MoreLikeThisComponent.process(MoreLikeThisComponent.java:127)
> at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)
> at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:177)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:2503)
> at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:710)
> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:516)
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:382)
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:326)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
> ...{code}
> and here's the config of my requestHandlers:
> {code:java}
> <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
> <lst name="defaults">
> <str name="suggest">true</str>
> <str name="suggest.count">10</str>
> <str name="suggest.dictionary">default</str>
> <str name="spellcheck">true</str>
> <str name="spellcheck.dictionary">default</str>
> <str name="spellcheck.dictionary">wordbreak</str>
> <str name="spellcheck.onlyMorePopular">true</str>
> <str name="spellcheck.extendedResults">true</str>
> <str name="spellcheck.count">10</str>
> <str name="spellcheck.collate">true</str>
> <str name="spellcheck.collateExtendedResults">true</str>
> <str name="spellcheck.alternativeTermCount">5</str>
> <str name="spellcheck.maxResultsForSuggest">5</str>
> <str name="spellcheck.maxCollationTries">10</str>
> <str name="spellcheck.maxCollations">5</str>
> <str name="mlt">true</str>
> <str name="mlt.fl">_text_</str>
> <str name="hl">on</str>
> <str name="hl.fl">content description title</str>
> <str name="hl.preserveMulti">true</str>
> <str name="hl.encoder">html</str>
> <str name="hl.simple.pre">&lt;b&gt;</str>
> <str name="hl.simple.post">&lt;/b&gt;</str>
> </lst>
> <arr name="components">
> <str>suggest</str>
> <str>spellcheck</str>
> <str>mlt</str>
> <str>highlight</str>
> </arr>
> </requestHandler>
> <requestHandler name="/mlt" class="solr.MoreLikeThisHandler"></requestHandler>
> {code}
> I also tried with 
> {code:java}
> <str name="mlt">on</str>{code}
> When I call
> {code:java}
> /mlt?df=_text_&q=pann&mlt.fl=_text_
> {code}
>  it works fine but with
> {code:java}
> /suggest?df=_text_&q=pann&mlt.fl=_text_
> {code}
> I got the npe
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message