On 11/03/14 11:20, Harkishan Singh wrote:
Thanks Andy Seaborne for the reply.

Can I use the same approach for finding score as we have in LARQ framework.
I mean by reusing some part of LARQ code??

LARQ is completely different internally from jena-text. Even the Lucene document index is different. The code can't be reused but the way it handles property functions is similar.

It shouldn't be too hard to add score handling to jena-text (for Lucene and for Solr) if you want to have a go at doing that. TextQueryPF is the place for catching text:query.

        Andy



On Tue, Mar 11, 2014 at 4:30 PM, Andy Seaborne <[email protected]> wrote:

On 11/03/14 08:38, Harkishan Singh wrote:

Hi,
I download the source code of jena-text version 1.0.0 and found that
mechanism for finding score is not implemented (went through this file
TextQueryPF.javaTextQueryPF.java) where as in LARQ this mechanism was there.

I'm not sure whether in version 1.0.1 they have implemented it.
I executed this query but didn't got any score.

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX text: <http://jena.apache.org/text#>
SELECT ?s ?score
    {?s text:query ("xyz" ?score ). }


Things in the triple object position are argument to the property function
- they need to be bound, they are not "out" parameters so score there is
used to limit the results (not that it's implemented IIRC - awaiting a
contribution).

The intended design is that the subject position is used for output of the
function (if already bound, it's effective a test of the right value).

So it would be

{ (?s ?score) text:query ("xyz"). }

but again not yet implemented.

         Andy



Does any one have an idea whether in latest version 1.0.1 they have
implemented it or not.

Thanks,
Harkishan Singh





Reply via email to