+ <form>SELECT DISTINCT ?thing </form>
+
+ <!-- Common indexes -->
+
+ <!-- bf.uri is a simple way to get to a thing -->
+ <index type="bf.uri">
+ ?thing rdf:type ?any FILTER( ?thing = %u )
+ </index>
+
+ <!-- bf.type is a simple way to search for types -->
+ <!-- for example, a bf.Work can also be bf:Text or bf:Audio -->
+ <index type="bf.type">
+ ?thing a %t
+ </index>
+
+ <!-- The BF-L present format is the same for everything -->
+ <!-- Each db is supposed to provide a dedicated BF-V present format -->
+ <present type="BF-L">
+ CONSTRUCT {
+ %u ?rel ?subj
+ }
+ WHERE {
+ %u ?rel ?subj .
+ }
+ </present>
+
+ </db>
+
+ <!-- "smallindex" db that will be included in work and instance -->
+ <!-- It provides the small indexes like bf.person, bf.place, etc -->
+ <!-- These match a person, etc, no matter what the relation to that -->
+ <!-- is, as long as there is a direct link -->
+ <!-- The %v gets assigned a new variable name, like ?v0. -->
+ <!-- The %vx gets the same ?v0, with the x suffixed to it, by regular -->
+ <!-- This way, we use a different variable for each index clause, and -->
+ <!-- do not get into trouble if we have an AND between two of the same kind -->
+ <db path="smallindex">
+ <index type="bf.personX">
+ ?thing ?rel %vx .
+ %vx a bf:Person .
+ %vx bf:label %v FILTER(contains(%v, %s))
+ </index>
+ <index type="bf.topic">
+ ?thing ?rel %vx .
+ %vx a bf:Topic .
+ %vx bf:label %v FILTER(contains(%v, %s))
+ </index>
+ <index type="bf.place">
+ ?thing ?rel %vx .
+ %vx a bf:Place .
+ %vx bf:label %v FILTER(contains(%v, %s))
+ </index>
+ <index type="bf.agent">
+ ?thing ?rel %vx .
+ %vx a bf:Agent .
+ %vx bf:label %v FILTER(contains(%v, %s))
+ </index>
+ <index type="bf.meeting">
+ ?thing ?rel %vx .
+ %vx a bf:Meeting .
+ %vx bf:label %v FILTER(contains(%v, %s))
+ </index>
+ <index type="bf.organization">
+ ?thing ?rel %vx .
+ %vx a bf:Organization .
+ %vx bf:label %v FILTER(contains(%v, %s))
+ </index>
+ <index type="bf.event">
+ ?thing ?rel %vx .
+ %vx a bf:Event .
+ %vx bf:label %v FILTER(contains(%v, %s))
+ </index>
+ </db>