[siren-user] Indexing and search triple
Blanca Hernández
blanca.hernandez at playence.com
Wed Dec 14 16:42:59 GMT 2011
Thanks again Renaud,
Sorry again, but I think that there is still something wrong with my index
process. As I can see in your example:
private final String[] doc1 = { "http://example.org/person/jim",
"<http://example.org/person/jim> <
http://example.org/schema/type> <http://example.org/schema/Person> .\n" +
"<http://example.org/person/jim> <
http://example.org/schema/type> <http://example.org/schema/Student> .\n" +
"<http://example.org/person/jim> <
http://example.org/schema/name> \"Jim Maple\" .\n" +
"<http://example.org/person/jim> <
http://example.org/schema/age> \"26\" .\n" +
"<http://example.org/person/jim> <
http://example.org/schema/workplace> \"DERI Galway\" .\n" };
you are indexing doc1[0] in url and doc1[1] in ntriple.
I'm not grouping at all my triples, is it necessary to know in advance
which triples have the same subject, predicate or the same object?
These are two examples of my index result, the field url is the same,
because I'm indexing in that field the subject.
SolrInputDocument[{url=url(1.0)={
http://msp.sonydadc.com/examples/talent/Bob%20Dylan},
ntriple=ntriple(1.0)={<http://msp.sonydadc.com/examples/talent/Bob%20Dylan>
<http://www.w3.org/2002/07/owl#bottomObjectProperty> <
http://msp.sonydadc.com/examples/talent/Bob%20Dylan> .}}]
SolrInputDocument[{url=url(1.0)={
http://msp.sonydadc.com/examples/talent/Bob%20Dylan},
ntriple=ntriple(1.0)={<http://msp.sonydadc.com/examples/talent/Bob%20Dylan>
<http://rhizomik.net/ontologies/2011/06/mspontology.owl#isCreatorOf>
<urn:isrc:USSM16401179> .}}]
As far as I understood, this field url is used for split an uri, using the
appropiated filters. It would make sense to analyze it only once, but more
triples could be indexed in the future so there is no way to group them all
in advance.
If my index process is right, would you have any clue about why a simple
query is not retrieving results? Thanks
El 14 de diciembre de 2011 15:31, Renaud Delbru
<renaud.delbru at deri.org>escribió:
> Hi Blanca
>
>
> On 14/12/11 14:00, Blanca Hernández wrote:
>
>> Hi Renaud,
>> thank you very much. Now I am able to perform some queries in my solr
>> interface!
>>
>> But, if possible, I would like to have something else clear:
>> As I wrote before, my solr documents just before being commited, holds
>> values like:
>>
>> SolrInputDocument[{**idHighlight=idHighlight(1.0)={**
>> httpmspsonydadccomexamplestale**ntbob%**20dylanhttpwwww3org200207owlsa**
>> meashttpmspsonydadccomexamples**talentbob%20dylan},
>> ntripleField=ntriple(1.0)={<ht**tp://msp.sonydadc.com/**
>> examples/talent/Bob%20Dylan<http://msp.sonydadc.com/examples/talent/Bob%20Dylan>
>> >
>> <http://www.w3.org/2002/07/**owl#sameAs<http://www.w3.org/2002/07/owl#sameAs>
>> >
>> <http://msp.sonydadc.com/**examples/talent/Bob%20Dylan<http://msp.sonydadc.com/examples/talent/Bob%20Dylan>>
>> .}}]
>>
>> When I want to perform a search, I can not send it with ':' on it, so
>> I'm using the function ClientUtils.escapeQueryChars, creating the query
>> in this way:
>>
>> ntriple:(<http\://msp.**sonydadc.com/examples/talent/**Bob%20Dylan<http://msp.sonydadc.com/examples/talent/Bob%20Dylan>
>> <http://msp.sonydadc.com/**examples/talent/Bob%20Dylan<http://msp.sonydadc.com/examples/talent/Bob%20Dylan>
>> >>
>> <http\://www.w3.org/2002/07/**owl#sameAs<http://www.w3.org/2002/07/owl#sameAs>
>> <http://www.w3.org/2002/07/**owl#sameAs<http://www.w3.org/2002/07/owl#sameAs>
>> >>
>> <http\://msp.sonydadc.com/**examples/talent/Bob%20Dylan<http://msp.sonydadc.com/examples/talent/Bob%20Dylan>
>>
>> <http://msp.sonydadc.com/**examples/talent/Bob%20Dylan<http://msp.sonydadc.com/examples/talent/Bob%20Dylan>
>> >>)
>>
>> In my solr interface:
>> http://localhost:8080/solr/**select/?q=ntriple%3A%28%**
>> 3Chttp\%3A%2F%2Fmsp.sonydadc.**com%2Fexamples%2Ftalent%2FBob%**
>> 2520Dylan%3E+%3Chttp\%3A%2F%**2Fwww.w3.org%2F2002%2F07%**
>> 2Fowl%23sameAs%3E+%3Chttp\%3A%**2F%2Fmsp.sonydadc.com%**
>> 2Fexamples%2Ftalent%2FBob%**2520Dylan%3E%29&version=2.2&**
>> start=0&rows=10&indent=on&qt=**siren<http://localhost:8080/solr/select/?q=ntriple%3A%28%3Chttp%5C%3A%2F%2Fmsp.sonydadc.com%2Fexamples%2Ftalent%2FBob%2520Dylan%3E+%3Chttp%5C%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23sameAs%3E+%3Chttp%5C%3A%2F%2Fmsp.sonydadc.com%2Fexamples%2Ftalent%2FBob%2520Dylan%3E%29&version=2.2&start=0&rows=10&indent=on&qt=siren>
>> <http://localhost:8080/solr/**select/?q=ntriple%3A%28%**
>> 3Chttp\%3A%2F%2Fmsp.sonydadc.**com%2Fexamples%2Ftalent%2FBob%**
>> 2520Dylan%3E+%3Chttp\%3A%2F%**2Fwww.w3.org%2F2002%2F07%**
>> 2Fowl%23sameAs%3E+%3Chttp\%3A%**2F%2Fmsp.sonydadc.com%**
>> 2Fexamples%2Ftalent%2FBob%**2520Dylan%3E%29&version=2.2&**
>> start=0&rows=10&indent=on&qt=**siren<http://localhost:8080/solr/select/?q=ntriple%3A%28%3Chttp%5C%3A%2F%2Fmsp.sonydadc.com%2Fexamples%2Ftalent%2FBob%2520Dylan%3E+%3Chttp%5C%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23sameAs%3E+%3Chttp%5C%3A%2F%2Fmsp.sonydadc.com%2Fexamples%2Ftalent%2FBob%2520Dylan%3E%29&version=2.2&start=0&rows=10&indent=on&qt=siren>
>> >
>>
>> This query should retrieve one result, but I don't get any. Should the
>> indexes be the same as the query sent?
>>
>
> You do not have to escape special character when using the ntriple and
> keyword query parser. So your query should look like this:
>
>
> ntriple:(<http://msp.sonydadc.**com/examples/talent/Bob%**20Dylan<http://msp.sonydadc.com/examples/talent/Bob%20Dylan>>
> <http://www.w3.org/2002/07/**owl#sameAs<http://www.w3.org/2002/07/owl#sameAs>>
> <http://msp.sonydadc.com/**examples/talent/Bob%20Dylan<http://msp.sonydadc.com/examples/talent/Bob%20Dylan>
> >)
>
> regards,
> --
> Renaud Delbru
>
--
*[image: Description: playence] <http://www.playence.com/>
*
*Blanca Hernández Nieto
**playence **GmbH*
Penthouse office Soho II - Top 1
Grabenweg 68
6020 Innsbruck
Austria
eMail. blanca.hernandez at playence.com <david.perez at playence.com>
Web. www.playence.com
[image: Description: skypeplayence] [image: Description:
twitterplayence]<http://twitter.com/playence>
[image: Description:
linkedinplayence]<http://www.linkedin.com/companies/playence>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deri.org/pipermail/siren/attachments/20111214/129e5374/attachment.htm>
More information about the siren
mailing list