[ https://issues.apache.org/jira/browse/JENA-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16240902#comment-16240902 ]
Code Ferret commented on JENA-1388: ----------------------------------- It seems worth pointing out that AND within the same subject can be accomplished: {noformat} select ?s where { ?s text:query 'idx1:abc' . ?s text:query 'idx2:jkl' . } {noformat} However, using the expanded {{text:query}} results has its oddities: {noformat} select ?s ?lit1 ?lit2 where { (?s ?sc1 ?lit1) text:query 'idx1:abc' . (?s ?sc2 ?lit2) text:query 'idx2:jkl' . } {noformat} Leads to ?s bound as expected but only ?lit1 is bound. This does not seem to be specifically related whether {{?s}} is bound or free when {{text:query}} is invoked, since: {noformat} select ?s ?lit1 ?lit2 where { (?s ?sc1 ?lit1) text:query 'idx1:abc' . (?s2 ?sc2 ?lit2) text:query 'idx2:jkl' . } {noformat} still leads to no binding for {{?lit2}}. I'm not clear whether {{?lit2}} being unbound is expected or not. I was surprised that it does not seem to get bound. > Lucene text search across multiple fields ("AND") yields no results > ------------------------------------------------------------------- > > Key: JENA-1388 > URL: https://issues.apache.org/jira/browse/JENA-1388 > Project: Apache Jena > Issue Type: Bug > Components: Text > Affects Versions: Jena 3.4.0 > Environment: CentOS 7.3, OpenJDK 64-Bit, v1.8.0_141-b16 > Reporter: Vilnis Termanis (Iotic Labs) > Assignee: Osma Suominen > Labels: index, lucene, search > Attachments: config-fields.ttl, multi_field.ttl, multi_index.sparql > > > Searching across two Lucene text indexed fields produces potentially > unexpected results. (The following assumes that the string supplied to each > field does match and is tied to the same uid/subject.) > # A query across two fields with *OR* produces two equal rows > # The same query but with *AND* produces no rows -- This message was sent by Atlassian JIRA (v6.4.14#64029)