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

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

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

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)

Reply via email to