Query returns ~15k results. I have to get all results since there is additional filtering done in separate Lucene index afterwards. After Lucene filter there might be 10 results left.

Also I can't replace ?child with keyword since I have to first get all children of the selected keywords like this:

<http://www.lingsoft.fi/ontologies/ce3598292f301cec> skos:narrower* ?child

Now came to mind that I could first make the Lucene query, and add that result as filter to this SPARQL query.

Mikael


On 16.8.2016 15:57, Osma Suominen wrote:
Hi Mikael!

Okay, so how many results does the query return in those 10 seconds? Is it the same if you leave out the DISTINCT? Do you really need all those results/triples in a single query result?

Does it help if you replace ?child with an actual keyword? Having an unbound variable in there makes the query apply for all subjects instead of a specific one.

-Osma

On 16/08/16 15:50, Mikael Pesonen wrote:

Hi Osma!

unfortunatelly I need to match those certain subjects - the application
is document search by selected keywords. And even if
    ?s <http://purl.org/dc/terms/subject> ?child .
is left out the search takes that ~10 seconds.

Br,
Mikael



--
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: [email protected]
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Linnankatu 10 A
FI-20100 Turku
FINLAND

Reply via email to