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 subversion and git services (Jira)" <ji...@apache.org> on 2019/10/21 08:54:00 UTC

[jira] [Commented] (JENA-1772) jena-text-es: exception if no limit supplied to text:query.

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

ASF subversion and git services commented on JENA-1772:
-------------------------------------------------------

Commit dd8446c4edd5f2e89e560a88f167db79c54aaabe in jena's branch refs/heads/master from Andy Seaborne
[ https://gitbox.apache.org/repos/asf?p=jena.git;h=dd8446c ]

Merge pull request #620 from afs/text-limit

JENA-1772: Set default ES search limit.

> jena-text-es: exception if no limit supplied to text:query.
> -----------------------------------------------------------
>
>                 Key: JENA-1772
>                 URL: https://issues.apache.org/jira/browse/JENA-1772
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Text
>    Affects Versions: Jena 3.12.0
>            Reporter: Andy Seaborne
>            Assignee: Andy Seaborne
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Taken from:
> https://stackoverflow.com/questions/58457087/does-the-text-query-es-module-require-limit-in-the-sparql-syntax
> if there is no limit in the {{text:query}}, there is a exception from ElasticSearch.
> {noformat}
> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> PREFIX text: <http://jena.apache.org/text#>
> SELECT ?subject ?object
> WHERE {
>     ?subject text:query ('Whatever').
>     ?subject rdfs:label ?object .
> }
> {noformat}
> causes:
> {noformat}
> [2019-10-18 14:27:56] Fuseki     INFO  [31] Query = PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>   PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>   PREFIX text: <http://jena.apache.
> org/text#>  SELECT ?subject ?object WHERE { ?subject text:query ('Whatever'). ?subject rdfs:label ?object . }
> [2019-10-18 14:27:56] Fuseki     WARN  [31] RC = 500 : [size] parameter cannot be negative, found [-1]
> java.lang.IllegalArgumentException: [size] parameter cannot be negative, found [-1]
>         at org.elasticsearch.search.builder.SearchSourceBuilder.size(SearchSourceBuilder.java:382)
>         at org.elasticsearch.action.search.SearchRequestBuilder.setSize(SearchRequestBuilder.java:204)
>         at org.apache.jena.query.text.es.TextIndexES.query(TextIndexES.java:403)
>         at org.apache.jena.query.text.es.TextIndexES.query(TextIndexES.java:378)
>         at org.apache.jena.query.text.TextQueryPF.performQuery(TextQueryPF.java:346)
>         at org.apache.jena.query.text.TextQueryPF.query(TextQueryPF.java:284)
>         at org.apache.jena.query.text.TextQueryPF.variableSubject(TextQueryPF.java:247)
>         at org.apache.jena.query.text.TextQueryPF.exec(TextQueryPF.java:211)
>         at org.apache.jena.sparql.pfunction.PropertyFunctionBase$RepeatApplyIteratorPF.nextStage(PropertyFunctionBase.java:106)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)