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

    https://github.com/apache/jena/pull/274#discussion_r135010895
  
    --- 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 checking.
    
    String "+" works on nulls (adds the word 'null') so we don't need to 
special case it.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to