0

I'm going to pose a question about indexes in GraphDB Lucene connector.

In the context of a multilingual rdf resource, how is it possible to index the rdfs:label values of a single language (for example english) ?

I tried with this:

PREFIX inst: <http://www.ontotext.com/connectors/lucene/instance#>
PREFIX : <http://www.ontotext.com/connectors/lucene#>

INSERT DATA {
     inst:lexicalEntryIndex :createConnector '''
 {
   "types": [
     "http://www.w3.org/ns/lemon/ontolex#LexicalEntry"
   ],
   "fields": [
     {
         "fieldName": "type",
         "propertyChain": [
           "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
           "http://www.w3.org/2000/01/rdf-schema#label"
         ],
         "languages": [
           "en"
         ]
     }
   ]
 }
 ''' .
 }

but all the languages are indexed.

Thanks in advance, Andrea

1 Answer 1

0

The GraphDB Lucene Connector documentation clearly demonstrates how to index a single language.

Here is a sample snippet how to do it:

PREFIX luc: <http://www.ontotext.com/connectors/lucene#>
PREFIX luc-index: <http://www.ontotext.com/connectors/lucene/instance#>

INSERT DATA {
  luc-index:my_index luc:createConnector '''
    {
      "types": ["http://www.ontotext.com/example#gadget"],
      "fields": [
         {
           "fieldName": "name",
           "propertyChain": [
             "http://www.ontotext.com/example#name"
           ]
         },
         {
           "fieldName": "nameLanguage",
           "propertyChain": [
             "http://www.ontotext.com/example#name",
             "lang()"
           ]
         }
      ], "entityFilter":"?nameLanguage in (\\"en\\")"
    }
  ''' .
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.