Github user osma commented on a diff in the pull request:

    https://github.com/apache/jena/pull/274#discussion_r134999319
  
    --- Diff: 
jena-text/src/main/java/org/apache/jena/query/text/TextQueryPF.java ---
    @@ -240,6 +240,36 @@ private QueryIterator concreteSubject(Binding binding, 
Node s, Node score, Node
         }
     
         private ListMultimap<String,TextHit> query(Node property, String 
queryString, String lang, int limit, ExecutionContext execCxt) {
    +        String graphURI = chooseGraphURI(execCxt);
    +        
    +        if ( graphURI == null ) {
    +            Explain.explain(execCxt.getContext(), "Text query: 
"+queryString) ;
    +            if ( log.isDebugEnabled())
    +                log.debug("Text query: {} ({})", queryString,limit) ;
    +        } else {
    +            Explain.explain(execCxt.getContext(), "Text query 
<"+graphURI+">: "+queryString) ;
    +            if ( log.isDebugEnabled())
    +                log.debug("Text query: {} <{}> ({})", queryString, 
graphURI, limit) ;
    +        }
    +        
    +        // Cache-key does not matter if lang or graphURI are null
    +        String cacheKey = limit + " " + property + " " + queryString + " " 
+ lang + " " + graphURI ;
    --- End diff --
    
    Thanks for pinging @afs. It's been a while since I looked at this code, but 
I think that the fix is the correct one here. I'm not sure I understand the 
comment "Cache-key does not matter if lang or graphURI are null" though - 
what's that intended to mean?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to