rvesse commented on issue #2094:
URL: https://github.com/apache/jena/issues/2094#issuecomment-1832044048

   > The other problem - the query
   > 
   > ```
   > # Query #3
   > 
   > select * where {
   > ?s text:query (mt:defQuery "white") 
   > }
   > ```
   > 
   > returning 1 hit.
   > 
   > I think this should return 0 hits - because the term _white_ is contained 
in the mt:note field and this field is not included in text:props
   > 
   > ```
   >         [ text:propListProp mt:defQuery ;
   >           text:props ( 
   >              rdfs:label
   >                mt:altLabel
   >              ) ;
   >         ]
   > ```
   
   I think this one is caused by the issue identified in 
https://github.com/apache/jena/issues/2094#issuecomment-1831510414, you map 
several properties to the same field in the underlying Lucene index.  Since the 
index doesn't store what property text originated from in the index a query on 
any of those properties that share the same Lucene field can thus return 
documents that matched based on any of the original input properties textual 
values.
   
   Not sure whether this a bug or not.  It appears to be a side effect of the 
design choices of how the data is indexed into Lucene.  This should maybe be 
flagged as a configuration and/or query time warning.
   
   To make the query behave as you expect either requires your configuration to 
change to separate the properties into different fields, or the `jena-text` 
code to change how it currently indexes and queries data (which would be a 
breaking change AFAICT)


-- 
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]

Reply via email to