You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (Jira)" <ji...@apache.org> on 2019/10/19 19:39:00 UTC
[jira] [Created] (JENA-1772) jena-text-es: exception if no limit
supplied to text:query.
Andy Seaborne created JENA-1772:
-----------------------------------
Summary: 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
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)