On 04/08/14 04:21, Deyan Chen wrote:
Hi Andy,
Thank you for your reply.
The Jena version is 2.11.2. The load process was not interrupted.
And I don't perform any update operation on the TDB store by Fuseki
SPARQL endpoint.
Number of triples is about 204,800,000.
Can I control or set the index way of TDB? How to do that If I can?
The indexing is fixed within the code (everything is indexed).
What did
PREFIX basekb: <http://rdf.basekb.com/>
SELECT * {
?s basekb:ns.mid ?o .
FILTER (str(?o), "medic")
}
and (you'll possibly want to count for this one)
PREFIX basekb: <http://rdf.basekb.com/>
SELECT * {
?s basekb:ns.mid ?object .
}
show?
The other good thing to check is to dump the database (stop Fuseki, use
tdbdump) then see if the triples necessary to match the pattern are present.
Andy
Regards,
Deyan Chen
在 2014年08月01日 22:49, Andy Seaborne 写道:
On 01/08/14 08:56, Deyan Chen wrote:
hi all,
Hi there,
(version number?)
I don't see anything wrong in what your doing.
Presumably you've tried
PREFIX basekb: <http://rdf.basekb.com/>
SELECT * {
?s basekb:ns.mid ?object .
}
and
PREFIX basekb: <http://rdf.basekb.com/>
SELECT * {
?s basekb:ns.mid ?o .
FILTER (str(?o), "medic")
}
The other possibility is that the initial load was interrupted, a
second JVM accessed the database at some cocurent time or a use of
database was non transaction during an update (Fuseki is transactional).
I have loaded a part of basekbpro data into TDB by tdbloader command.
The size of the TDB store is about 26GB.
Number of triples or quads?
Then I use Jena fuseki server to publish the TDB store through a SPARQL
endpoint.
But when I run the following SPARQLs:
PREFIX basekb: <http://rdf.basekb.com/>
CONSTRUCT {?s ?p ?o .}
WHERE
{
?s basekb:ns.mid "/medicine/medical_trial_type/medical_trials" .
?s ?p ?o .
}
or
PREFIX basekb: <http://rdf.basekb.com/>
CONSTRUCT {?s ?p ?o .}
WHERE
{
?s basekb:ns.mid ?object .
FILTER regex(?object,
"/medicine/medical_trial_type/medical_trials")
?s ?p ?o .
}
There is no any output. When I run the following SPARQL:
PREFIX basekb: <http://rdf.basekb.com/ns/>
CONSTRUCT {basekb:m.0dbzfg8 ?p ?o .}
WHERE
{
basekb:m.0dbzfg8 ?p ?o .
}
I can get the following output:
<http://rdf.basekb.com/ns/m.0dbzfg8>
<http://www.w3.org/2000/01/rdf-schema#domain>
<http://rdf.basekb.com/ns/m.0220py_> .
<http://rdf.basekb.com/ns/m.0dbzfg8>
<http://rdf.basekb.com/ns/rdfs.comment> "Medical trials of this
type."@en .
<http://rdf.basekb.com/ns/m.0dbzfg8>
<http://rdf.basekb.com/ns/freebase.property_hints.disambiguator>
"false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://rdf.basekb.com/ns/m.0dbzfg8>
<http://rdf.basekb.com/ns/freebase.documented_object.tip> "Medical
trials of this type."@en .
<http://rdf.basekb.com/ns/m.0dbzfg8> <http://rdf.basekb.com/ns.mid>
"/medicine/medical_trial_type/medical_trials" .
<http://rdf.basekb.com/ns/m.0dbzfg8>
<http://rdf.basekb.com/ns/freebase.property_hints.display_none>
"false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://rdf.basekb.com/ns/m.0dbzfg8>
<http://rdf.basekb.com/ns/freebase.object_hints.best_hrid>
"/medicine/medical_trial_type/medical_trials" .
<http://rdf.basekb.com/ns/m.0dbzfg8>
<http://www.w3.org/2000/01/rdf-schema#label> "Medical trials"@en .
<http://rdf.basekb.com/ns/m.0dbzfg8>
<http://www.w3.org/2000/01/rdf-schema#range>
<http://rdf.basekb.com/ns/m.0220pym> .
<http://rdf.basekb.com/ns/m.0dbzfg8>
<http://rdf.basekb.com/ns/freebase.property_hints.display_orientation>
"vertical"@en .
<http://rdf.basekb.com/ns/m.0dbzfg8>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2000/01/rdf-schema#Property> .
<http://rdf.basekb.com/ns/m.0dbzfg8>
<http://rdf.basekb.com/ns/m.0j2r9sk>
<http://rdf.basekb.com/ns/m.01xljp5> .
When I use the following SPARQL to query another object:
PREFIX basekb: <http://rdf.basekb.com/>
CONSTRUCT {?s ?p ?o .}
WHERE
{
?s basekb:ns.mid "/medicine/medical_trial_phase/medical_trials".
?s ?p ?o .
}
or
PREFIX basekb: <http://rdf.basekb.com/>
CONSTRUCT {?s ?p ?o .}
WHERE
{
?s basekb:ns.mid ?object .
FILTER regex(?object,
"/medicine/medical_trial_phase/medical_trials")
?s ?p ?o .
}
I can get the following output:
<http://rdf.basekb.com/ns/m.0dbyyxn>
<http://www.w3.org/2000/01/rdf-schema#domain>
<http://rdf.basekb.com/ns/m.0220pzc> .
<http://rdf.basekb.com/ns/m.0dbyyxn>
<http://rdf.basekb.com/ns/freebase.object_hints.best_hrid>
"/medicine/medical_trial_phase/medical_trials" .
<http://rdf.basekb.com/ns/m.0dbyyxn>
<http://rdf.basekb.com/ns/rdfs.comment> "Medical trials of this
phase."@en .
<http://rdf.basekb.com/ns/m.0dbyyxn>
<http://rdf.basekb.com/ns/freebase.property_hints.display_none>
"false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://rdf.basekb.com/ns/m.0dbyyxn>
<http://rdf.basekb.com/ns/m.0j2r9sk>
<http://rdf.basekb.com/ns/m.01xljp5> .
<http://rdf.basekb.com/ns/m.0dbyyxn>
<http://rdf.basekb.com/ns/freebase.documented_object.tip> "Medical
trials of this phase."@en .
<http://rdf.basekb.com/ns/m.0dbyyxn>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2000/01/rdf-schema#Property> .
<http://rdf.basekb.com/ns/m.0dbyyxn>
<http://rdf.basekb.com/ns/freebase.property_hints.display_orientation>
"vertical"@en .
<http://rdf.basekb.com/ns/m.0dbyyxn>
<http://www.w3.org/2000/01/rdf-schema#range>
<http://rdf.basekb.com/ns/m.0220pym> .
<http://rdf.basekb.com/ns/m.0dbyyxn>
<http://www.w3.org/2000/01/rdf-schema#label> "Medical trials"@en .
<http://rdf.basekb.com/ns/m.0dbyyxn>
<http://rdf.basekb.com/ns/freebase.property_hints.disambiguator>
"false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://rdf.basekb.com/ns/m.0dbyyxn> <http://rdf.basekb.com/ns.mid>
"/medicine/medical_trial_phase/medical_trials" .
I have do another test. I have loaded m.0dbyyxn and m.0dbzfg8 related
triples into another TDB store by tdbloader command and then perform the
above SPARQLs, I can always get right output.
So I think whether the index of the first TDB load(26GB) has problems.
But I am not sure.
Any help or suggestions would be greatly appreciated.
Than you very much.
Regards,
Deyan Chen