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

Jochen Barth commented on SOLR-13267:
-------------------------------------

Using NOT instead of "AND NOT" did not help. Could it have to do with the

{!graph...} ( \{!graph...} AND \{!graph...} )

query, especially with the round paranthesis after the first {!graph ?

Stack trace:

{
  "responseHeader":{
    "status":500,
    "QTime":96,
    "params":{
      "q":"(\{!graph from=id to=parent_ids}fulltext_ocr_txtlarge:phoron
AND \{!graph from=id to=parent_ids}fulltext_ocr_txtlarge:terrae)
NOT (\{!graph from=id to=parent_ids returnRoot=false}
(\{!graph from=id to=parent_ids}fulltext_ocr_txtlarge:phoron AND
{!graph from=id to=parent_ids}
fulltext_ocr_txtlarge:terrae))",
      "_":"1551077401527"}},
  "error":{
    "trace":"java.lang.NullPointerException
    at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:685)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:470)
    at org.apache.solr.search.join.GraphQuery.getDocSet(GraphQuery.java:207)
    at org.apache.solr.search.join.GraphQuery.scorer(GraphQuery.java:271)
    at org.apache.lucene.search.Weight.scorerSupplier(Weight.java:143)
    at 
org.apache.lucene.search.BooleanWeight.scorerSupplier(BooleanWeight.java:364)
    at org.apache.lucene.search.BooleanWeight.scorer(BooleanWeight.java:330)
    at 
org.apache.lucene.search.BooleanWeight.booleanScorer(BooleanWeight.java:295)
    at org.apache.lucene.search.BooleanWeight.bulkScorer(BooleanWeight.java:318)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:667)
    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:471)
    at 
org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:200)
    at 
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1604)
    at 
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1421)
    at 
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:568)
    at 
org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1435)
    at 
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:375)
    at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:298)
    at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:2551)
    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:395)
    at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:341)
    at 
org.eclipse.jetty.servlet.ServletHandler.doFilter(ServletHandler.java:1602)
    at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
    at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
    at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
    at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588)
    at 
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
    at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
    at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
    at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557)
    at 
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
    at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
    at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
    at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)
    at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
    at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at 
org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
    at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at org.eclipse.jetty.server.Server.handle(Server.java:502)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
    at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
    at 
org.eclipse.jetty.io.AbstractConnection.succeeded(AbstractConnection.java:305)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
    at org.eclipse.jetty.io.ChannelEndPoint.run(ChannelEndPoint.java:118)
    at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
    at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
    at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
    at 
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
    at 
org.eclipse.jetty.util.thread.ReservedThreadExecutor.run(ReservedThreadExecutor.java:366)
    at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
    at 
org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:748)
",

> complex {!graph query: NullPointerException
> -------------------------------------------
>
>                 Key: SOLR-13267
>                 URL: https://issues.apache.org/jira/browse/SOLR-13267
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 7.7
>            Reporter: Jochen Barth
>            Priority: Major
>
> this query leads to NullPointerException:
> (\{!graph from=id to=parent_ids}fulltext_ocr_txtlarge:phoron
> AND \{!graph from=id to=parent_ids}fulltext_ocr_txtlarge:terrae)
> AND NOT (\{!graph from=id to=parent_ids returnRoot=false}
> (\{!graph from=id to=parent_ids}fulltext_ocr_txtlarge:phoron AND
> {!graph from=id to=parent_ids}fulltext_ocr_txtlarge:terrae))
> It is essentially the query
> X = \{!graph from=id to=parent_ids}fulltext_ocr_txtlarge:phoron
> AND \{!graph from=id to=parent_ids}fulltext_ocr_txtlarge:terrae
> (X) AND NOT (\{!graph from=id to=parent_ids returnRoot=false}(X))
> parent_ids is a multiValued string docValue-Field; fulltext_ocr_txtlarge is 
> essentially like the *_txt field.
> Use case is: hierarchical solr-docs, think book, chapter, subchapter etc. 
> Each containing fulltext_ocr_txtlarge with the fulltext of this element only. 
> So higher level elements (e. g. book) does not contain the fulltext of lower 
> level elements (e. g. chapters).
> The query X delivers all chapters with both words, but of course higher level 
> elements, too, because the whole book has always more text than single 
> chapters.
> the »AND NOT ({!graph ... « part is to filter out the unecessary results, 
> like »book« if a chapter already matches.
>  
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to