title: GraphDB + Lucene Index: can I get the matched predicate / literal?
body: <p>Following <a href="http://graphdb.ontotext.com/documentation/free/full-text-search.html" rel="nofollow noreferrer">the instructions</a> i set up an index that covers multiple (literal-)predicates:</p>
  
  <pre><code>  PREFIX luc: &lt;http://www.ontotext.com/owlim/lucene#&gt;
    INSERT DATA {
      luc:index             luc:setParam "uris" .
      luc:include           luc:setParam "literals" .
      luc:moleculeSize      luc:setParam "1" .
      luc:includePredicates luc:setParam "http://purl.org/dc/terms/title http://www.w3.org/2000/01/rdf-schema#label http://www.w3.org/2004/02/skos/core#prefLabel http://www.w3.org/2004/02/skos/core#altLabel" .
    }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>PREFIX luc: &lt;http://www.ontotext.com/owlim/lucene#&gt;
  INSERT DATA {
    luc:${Cfg.literalIndex}   luc:createIndex   "true" .
  }
  </code></pre>
  
  <p>This part seems to work just fine. My question now is, <strong>is there some way to get the matched predicate or literal in my SPARQL query</strong>?</p>
  
  <p>So assume the following data:</p>
  
  <pre><code>:exA rdfs:label     'label' ;
       dct:title      'title' .
  </code></pre>
  
  <p>I'd like to do something like this</p>
  
  <pre><code>SELECT *
  WHERE {
    ?needle luc:labelIndex "title" ;
            luc:predicate  ?predicate ;
            ?predicate     ?label .
  }
  </code></pre>
  
  <p>If something like this <code>luc:predicate</code> exists, this could give me the actually matched predicate alongside the matches value. However, I'm not even sure Lucene indexes the predicate, which would be needed to enable such a function.</p>