1

im using ruleset OWL-RL optimized and using elasticsearch connector for search.

All i want is to recoginize the entity has same value and merge all values into one document in es. Im doing this by:

Person - hasPhone - Phone and have InverseFunctionalProperty on relation hasPhone

Example:

http://example.com#1 http://example.com#hasPhone http://example.com#111.

http://example.com#2 http://example.com#hasPhone http://example.com#111.

=> #1 owl:sameAs #2

when i search by ES, i receive two result both #1, #2 . But when i repair connector i get only one result (that what i want).

1./ I want to ask is there a way that ES connector auto merge doc and delete previous doc ?, because i dont want to repair connector all the time. When i set manageIndex:false, it always get two results when searching.

2./ How to receive only one record, exculding the others have owl:sameAs with this record by SPARQL.

3./ Is there a better ruleset for owl:sameAs and InverseFunctionalProperty for reference ?

1 Answers1

1
  1. The connector watches for changes to property paths (as specified by the index definition) but I don't think it can detect the merging (smushing) caused by sameAs, that's why you need the rebuilding. If this is an important case, I can post an improvement issue for you, but please email graphdb-support and vladimir.alexiev at ontotext with a description of your business case (and link to this question)

  2. If you have "sameAs optimization" enabled for the repo (which it is by default) and do NOT have "expand sameAs URLs" in the query, you should get only 1 result for queries like ?x <http://example.com#hasPhone> <http://example.com#111>

  3. OWL-RL-Optimized is good for your case. (The rulesets supporting InverseFunctionalProperty are OWL-RL, OWL-QL, rdfsPlus and their optimized variants.)

Vladimir Alexiev
  • 2,477
  • 1
  • 20
  • 31