You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/12/01 11:43:00 UTC

[jira] [Commented] (JENA-1438) rdf:langString argument to text:query silently ignored

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

ASF GitHub Bot commented on JENA-1438:
--------------------------------------

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

    https://github.com/apache/jena/pull/320#discussion_r154326766
  
    --- Diff: jena-text/src/main/java/org/apache/jena/query/text/TextQueryPF.java ---
    @@ -347,11 +352,15 @@ private StrMatch objectToStruct(PropFuncArg argObject, boolean executionTime) {
                     log.warn("Text query string is not a literal " + list) ;
                 return null ;
             }
    -        
    -        if (x.getLiteralDatatype() != null && !x.getLiteralDatatype().equals(XSDDatatype.XSDstring)) {
    --- End diff --
    
    Comment:
    In RDF 1.1, the data type of a literal is never null.
    
    There are functions like `Util.isLangString` (in RDF 1.1: rdf:langString) and `Util.isSimpleString` (in RDF 1.1, xsd:string) that mask the RDF1.0/RDF 1.1 mode setting (not that Jena claims to support RDF 1.0 any more).


> rdf:langString argument to text:query silently ignored
> ------------------------------------------------------
>
>                 Key: JENA-1438
>                 URL: https://issues.apache.org/jira/browse/JENA-1438
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 3.5.0
>         Environment: N/A
>            Reporter: Code Ferret
>            Priority: Minor
>
> Queries of the form:
>     {{?s text:query "some string"@lang-code}}
> return no results even when there are matches found by the _equivalent_:
>     {{?s text:query ("some string" "lang:lang-code")}}
> {quote}
> Note the above _equivalent_ form is currently valid only if 
>     {{text:multilingualSupport false}}.
> {quote} See [JENA-1437|https://issues.apache.org/jira/browse/JENA-1437]
> A reasonable fix is to recognize the {{rdf:langString}} case and treat it as the _equivalent_ form referring to the {{text:defautlField}}; otherwise, at least an error should be indicated.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)