在 2014年08月04日 19:09, Andy Seaborne 写道:
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 regex(str(?o), "medic")
}
The output is:
......
| <http://rdf.basekb.com/ns/m.0h8q646> |
"/medicine/drug_formulation/brand_names" |
| <http://rdf.basekb.com/ns/m.0220pym> | "/medicine/medical_trial" |
| <http://rdf.basekb.com/ns/m.0dbyyxn> |
"/medicine/medical_trial_phase/medical_trials" |
| <http://rdf.basekb.com/ns/m.04822f4> |
"/base/bioventurist/bv_medical_condition" |
| <http://rdf.basekb.com/ns/m.070bxqt> | "/medicine/diagnostic_sign/tests"
......
But I can't find some resources, for example,
"/medicine/medical_trial_type/medical_trials".
and (you'll possibly want to count for this one)
PREFIX basekb: <http://rdf.basekb.com/>
SELECT * {
?s basekb:ns.mid ?object .
}
show?
This time I can find:
| <http://rdf.basekb.com/ns/m.0dbzfg8> |
"/medicine/medical_trial_type/medical_trials" |
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.
Only some resources can't be filtered regex operator. But I can get
related triples by their mids, for example, 'm.0dbzfg8'.
From the output, I think they should match the pattern in the regex
operator.
When I put these resources into another TDB, I can get them by regex
operator.
So I still don't know why.
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
.
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from
your system. Thank you.
---------------------------------------------------------------------------------------------------