I'm a bit confused here. I have the following SPARQL query that works brilliantly against the LinkedMDB explorer.
PREFIX mdb: <http://data.linkedmdb.org/resource/movie/film>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dc: <http://purl.org/dc/terms/>
SELECT ?label?resource WHERE {
?resource mdb:id ?uri .
?resource dc:title ?label .
FILTER regex(?label,'^Batman')
}
This one filters out all the Batman movies like this (I've filtered out all the results and is only showing five here):
-----------------------------------------------|
| Label | Resource |
|----------------------------------------------|
| Batman | db:film/2 |
| Batman | db:film/3 |
| Batman & Robin | db:film/4 |
| Batman: Mask of the Phantasm | db:film/737|
| Batman: Mystery of the Batwoman | db:film/974|
-----------------------------------------------|
But, here comes the question. If I write "Forrest Gump" instead of "Batman", the query can't find any result.
However, if I change the last line to
?resource dc:title "Forrest Gump".
it finds the movie in the LinkedMDB database, so I know its hiding there somewhere. But it's not returned when I use the FILTER regex
solution.
I've noticed that if I only search without filter and just print all the movies in the database, it looks like LinkedMDB have some sort of LIMIT on 2557 so that the webpage won't crash. And it looks like the FILTER only filters those 2557 movies. Is there a way to retrieve more movies?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…