You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mikael Pesonen <mi...@lingsoft.fi> on 2021/01/06 15:37:39 UTC

Lucene AND problem with Jena Text

Hi,

I've got 3 predicates indexed, but AND works only for the default 
predicate.

Config:

<#entMap> a text:EntityMap ;
     text:defaultField     "lsrm_lmz_title" ;
     text:entityField      "uri" ;
     text:uidField         "uid" ;
     text:langField        "lang" ;
     text:graphField       "graph" ;
     text:map (
         [ text:field "lsrm_lmz_title" ; text:predicate lsrm:lmz_title]
         [ text:field "lsrm_lmz_content" ; text:predicate lsrm:lmz_content]
         [ text:field "vcard_fn" ; text:predicate vcard:fn ]
     ) .

?s text:query (lsrm:lmz_title "some AND text")

works but

?s text:query (lsrm:lmz_content "some AND text")

or

?s text:query (vcard:fn "some AND text")

returns 0 results. "some text" works for all three. Wonder what is going 
on here?


Re: Lucene AND problem with Jena Text

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Other queries work with parentheses "(some AND text)" so no problem.

On 06/01/2021 17.37, Mikael Pesonen wrote:
>
> Hi,
>
> I've got 3 predicates indexed, but AND works only for the default 
> predicate.
>
> Config:
>
> <#entMap> a text:EntityMap ;
>     text:defaultField     "lsrm_lmz_title" ;
>     text:entityField      "uri" ;
>     text:uidField         "uid" ;
>     text:langField        "lang" ;
>     text:graphField       "graph" ;
>     text:map (
>         [ text:field "lsrm_lmz_title" ; text:predicate lsrm:lmz_title]
>         [ text:field "lsrm_lmz_content" ; text:predicate 
> lsrm:lmz_content]
>         [ text:field "vcard_fn" ; text:predicate vcard:fn ]
>     ) .
>
> ?s text:query (lsrm:lmz_title "some AND text")
>
> works but
>
> ?s text:query (lsrm:lmz_content "some AND text")
>
> or
>
> ?s text:query (vcard:fn "some AND text")
>
> returns 0 results. "some text" works for all three. Wonder what is 
> going on here?
>

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND