I think I might be misunderstanding the purpose of   text:graphField "graph"
I thought that "graph" should be replaced with the IRI of my graphs, for example

    text:graphField "graph-1"
    text:graphField "graph-2"
    text:graphField "graph-3"
    ...

but this is probably wrong. The correct interpretation is, I guess, that I 
should simply add  text:graphField "graph"  to the text:entityMap and nothing 
more. "graph" is probably a Lucene field (which I can call whatever I want), 
and Lucene will just create a huge index with all mapped predicates from all 
graphs. Then, if I use "SELECT ... FROM <some-graph>" Lucene should restrict 
the search to those records where field "graph" = <some-graph>.


Is this correct? Can somebody confirm?



Sent: Wednesday, May 24, 2017 at 4:53 PM
From: "Laura Morales" <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: Adding more than one text-query index
> The question seems to imply that different graphs would be stored in
> different Lucene indexes.

No, only one index but many maps, one per graph. Like this:

:dataset_lucene a text:TextIndexLucene ;
text:directory <file:Lucene> ;
text:entityMap :map_graph1 ;
text:entityMap :map_graph2 .

:map_graph1 a text:EntityMap ;
text:graphField "graph-1" ;
text:entityField "uri" ;
text:defaultField "label" ;
text:map (
[ text:field "label" ;
text:predicate rdfs:label ]
) .

:map_graph2 a text:EntityMap ;
text:graphField "graph-2" ;
text:entityField "uri" ;
text:defaultField "label" ;
text:map (
[ text:field "label" ;
text:predicate rdfs:label ]
) .

What happens in this case? Are the "uri" or "label" fields from both map_graph1 
and map_graph2 merged? Do I have to call them with different names like 
"graph1_uri" and "graph2_uri"? Or are they distinct? Because if they are 
merged, it's pretty much the same as using 1 single text:EntityMap without any 
text:graphField definition.

Thank you.




Sent: Wednesday, May 24, 2017 at 4:03 PM
From: "Osma Suominen" <[email protected]>
To: [email protected]
Subject: Re: Adding more than one text-query index
Hi,

Andy Seaborne kirjoitti 24.05.2017 klo 14:34:

>> 2) say I create an <#entMap> for each graph in the dataset, and use
>> text:graphField "some-graph" in each <#entMap>. Can I define Lucene
>> fields with the same name on different graphs? Or will fields with the
>> same name be merged all together across all graphs?
>
> I have not used the named graph support so I'm not sure.
The graphField behaves in much the same way as entityField.

The question seems to imply that different graphs would be stored in
different Lucene indexes. That is not true. Instead, all graphs (from
the same dataset) will be stored in one Lucene index, with the graph
IRIs of individual entities (triples/quads in practice) stored in the
graphField so that queries can be efficiently restricted to a particular
graph. You cannot set different jena-text options per graph.

-Osma

--
Osma Suominen
D.Sc. (Tech), Information Systems Specialist
National Library of Finland
P.O. Box 26 (Kaikukatu 4)
00014 HELSINGIN YLIOPISTO
Tel. +358 50 3199529
[email protected]
http://www.nationallibrary.fi

Reply via email to