[siren-user] Indexing and search triple
Renaud Delbru
renaud.delbru at deri.org
Wed Dec 14 16:49:42 GMT 2011
Hi,
On 14/12/11 16:42, Blanca Hernández wrote:
> 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> .}}]
You need to group all the data for one document (i.e. url) into one
single SolrInputDocument. If Solr receives twice a document with the
same URL, then the first document is deleted and the second document
received is indexed instead.
So, yes you need to group all the data (e.g., triples) belonging to a
same subject prior to indexing.
--
Renaud Delbru
More information about the siren
mailing list