filak opened a new issue, #2974: URL: https://github.com/apache/jena/issues/2974
### Version 5.3.0 ### What happened? I have just done some testing of Jena 5.3 to see if this works now https://github.com/apache/jena/pull/2121 (@OyvindLGjesdal @rvesse) and it looks like the text queries with props list still do not work properly. The query always falls back to search in the text:defaultField - ignoring the propListProp specified - https://jena.apache.org/documentation/query/text-query.html#lists-of-indexed-properties I have simplified the test case based on the original issue https://github.com/apache/jena/issues/2094: Dataset - drinks.nt ``` <http://id.example.test/1-beer> <http://www.w3.org/2000/01/rdf-schema#label> "beer" . <http://id.example.test/1-beer> <http://id.example.test/vocab/#note> "Made from hops and barley" . <http://id.example.test/2-wine> <http://www.w3.org/2000/01/rdf-schema#label> "wine" . <http://id.example.test/2-wine> <http://id.example.test/vocab/#note> "Made from grapes" . ``` Config - drinks.ttl ``` @prefix : <http://localhost/jena_example/#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix tdb2: <http://jena.apache.org/2016/tdb#> . @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> . @prefix text: <http://jena.apache.org/text#> . @prefix fuseki: <http://jena.apache.org/fuseki#> . @prefix mt: <http://id.example.test/vocab/#> . [] ja:loadClass "org.apache.jena.query.text.TextQuery" . text:TextDataset rdfs:subClassOf ja:RDFDataset . text:TextIndexLucene rdfs:subClassOf text:TextIndex . text:TextIndexES rdfs:subClassOf text:TextIndex . :text_dataset a text:TextDataset ; text:dataset <#dataset> ; text:index <#indexLucene> ; . <#dataset> a tdb2:DatasetTDB2 ; tdb2:location "d:/Data/jena5/databases/drinks" ; . <#indexLucene> a text:TextIndexLucene ; text:directory "d:/Data/jena5/indexes/drinks" ; text:entityMap <#entMap> ; text:storeValues false ; text:analyzer [ a text:ConfigurableAnalyzer ; text:tokenizer text:StandardTokenizer ; text:filters ( text:ASCIIFoldingFilter text:LowerCaseFilter ) ] ; text:queryParser text:AnalyzingQueryParser ; text:multilingualSupport false ; text:propLists ( [ text:propListProp mt:labelOnly ; text:props ( rdfs:label ) ; ] [ text:propListProp mt:noteOnly ; text:props ( mt:note ) ; ] ) ; . <#entMap> a text:EntityMap ; text:defaultField "ftext" ; text:entityField "uri" ; text:uidField "uid" ; text:langField "lang" ; text:graphField "graph" ; text:map ( [ text:field "ftext" ; text:predicate rdfs:label ] [ text:field "ftext" ; text:predicate mt:note ] ) . <#service_text_tdb> a fuseki:Service ; rdfs:label "Drinks TEST with Jena 5.3" ; fuseki:name "drinks" ; fuseki:serviceQuery "query" ; fuseki:serviceQuery "sparql" ; fuseki:serviceUpdate "update" ; fuseki:serviceUpload "upload" ; fuseki:serviceReadGraphStore "get" ; fuseki:serviceReadWriteGraphStore "data" ; fuseki:dataset :text_dataset ; . ``` The queries and expected results: ``` PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX text: <http://jena.apache.org/text#> PREFIX mt: <http://id.example.test/vocab/#> # Query 1 - returns both items - searching in the text:defaultField "ftext" - OK select * where { (?s ?score) text:query ("beer OR grapes") } # Query 2 - returns http://id.example.test/2-wine - shall return none - there is no *grapes* term in the rdfs:label fields select * where { (?s ?score) text:query (mt:labelOnly "grapes") } # Query 3 - returns http://id.example.test/1-beer - shall return none - there is no *beer* term in the note fields select * where { (?s ?score) text:query (mt:noteOnly "beer") } ``` This looks like the queries are always being targeted to the defaultField. ### Relevant output and stacktrace ```shell ``` ### Are you interested in making a pull request? No -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
