Fuseki with TDB and Solr config

# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 @prefix : <#> . @prefix fuseki: <http://jena.apache.org/fuseki#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> . @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> . @prefix text: <http://jena.apache.org/text#> . @prefix kog: <http://www.bostonontology.com/bigdata/ontologies/2015/9/kognetics#> [] rdf:type fuseki:Server ; # Timeout - server-wide default: milliseconds. # Format 1: "1000" -- 1 second timeout # Format 2: "10000,60000" -- 10s timeout to first result, then 60s timeout to for rest of query. # See java doc for ARQ.queryTimeout ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "60000" ] ; # ja:loadClass "your.code.Class" ; fuseki:services ( <#10q> <#test> ) . ## Example of a TDB dataset and text index ## Initialize TDB [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" . tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset . tdb:GraphTDB rdfs:subClassOf ja:Model . ## Initialize text query [] ja:loadClass "org.apache.jena.query.text.TextQuery" . # A TextDataset is a regular dataset with a text index. text:TextDataset rdfs:subClassOf ja:RDFDataset . # Lucene index text:TextIndexLucene rdfs:subClassOf text:TextIndex . # Solr index text:TextIndexSolr rdfs:subClassOf text:TextIndex . ## --------------------------------------------------------------- ## Updatable TDB dataset with all services enabled. <#test> rdf:type fuseki:Service ; rdfs:label "TDB RRA" ; fuseki:name "RRA" ; fuseki:serviceQuery "query" ; fuseki:serviceQuery "sparql" ; fuseki:serviceUpdate "update" ; fuseki:serviceUpload "upload" ; fuseki:serviceReadWriteGraphStore "data" ; # A separate read-only graph store endpoint: fuseki:serviceReadGraphStore "get" ; fuseki:dataset <#testDataSet> ; . <#testDataSet> rdf:type tdb:DatasetTDB ; tdb:location "/Users/ashish/Documents/app/apache-jena-fuseki-2.3.0/DB/test" ; ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "60000" ] ; ##tdb:unionDefaultGraph true ; . <#10q> rdf:type fuseki:Service ; rdfs:label "TDB kg" ; fuseki:name "kg" ; fuseki:serviceQuery "query" ; fuseki:serviceQuery "sparql" ; fuseki:serviceUpdate "update" ; fuseki:serviceUpload "upload" ; fuseki:serviceReadWriteGraphStore "data" ; # A separate read-only graph store endpoint: fuseki:serviceReadGraphStore "get" ; fuseki:dataset <#10q_text_dataset> ; . :10q_text_dataset rdf:type text:TextDataset ; text:dataset <#10q_dataset> ; text:index <#10q_indexSolr> ; . <#10q_dataset> rdf:type tdb:DatasetTDB ; tdb:location "/Users/ashish/Documents/app/apache-jena-fuseki-2.3.0/DB/10q" ; ##ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "60000" ] ; ##tdb:unionDefaultGraph true ; . <#10q_indexSolr> rdf:type text:TextIndexSolr ; text:server <http://localhost:8983/solr/10q> ; #text:server <embedded:SolrARQ> ; text:entityMap <#10q_entMap> ; . # Mapping in the index # URI stored in field "uri" # rdfs:label is mapped to field "text" <#10q_entMap> a text:EntityMap ; text:entityField "uri" ; text:defaultField "text" ; ## Should be defined in the text:map. text:map ( # rdfs:label [ text:field "text" ; text:predicate kog:definition ] [ text:field "text" ; text:predicate kog:value ] [ text:field "text" ; text:predicate kog:segmentValue ] [ text:field "text" ; text:predicate kog:term ] ) .
Configure Fuseki with solr

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.