CentreForDigitalHumanities / edpop-explorer

Common interface to multiple library catalogues and bibliographical databases
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

STCN uniformity issue and slow retrieval #40

Open linguistcrg opened 3 months ago

linguistcrg commented 3 months ago

While performing a search of the word "almanac", instead of getting this output: Performing query: almanac

I get the following output:

Performing query: prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix schema: <http://schema.org/>
prefix owl: <http://www.w3.org/2002/07/owl#>
select ?s ?name where
{
  ?s ?p ?o .
  ?s <http://schema.org/name> ?name .
  ?s schema:mainEntityOfPage/schema:isPartOf <http://data.bibliotheken.nl/id/dataset/stcn> .
  FILTER (regex(?o, "almanac","i"))
}
order by ?s

I still get the list of results right afterwards, but it takes too long.

tijmenbaarda commented 3 months ago

STCN is very slow indeed, too slow. This has to do with the regex filter in the SPARQL query.

There might be two solutions:

jgonggrijp commented 3 months ago
  • Find an alternative to the regex filter, or find a way to make it quicker. @jgonggrijp : do you know if this is possible?

Probably not, but please do give me pointer to the code in question. I might come up with an idea when I see it.