Add subject to reindex in AdditionalURIsForObjectProperties (#225)

Co-authored-by: Georgy Litvinov <git@litvinovg.pro>
This commit is contained in:
Ben 2021-04-09 08:39:15 -06:00 committed by GitHub
parent ebca021bc4
commit b283a8342a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

View file

@ -59,16 +59,16 @@ public class AdditionalURIsForObjectProperties implements IndexingUriFinder, Con
public void endIndexing() { /* nothing to do */ }
protected List<String> doObjectPropertyStmt(Statement stmt) {
// Only need to consider the object since the subject
// will already be updated in search index as part of
// SearchReindexingListener.
// Also, context nodes are not handled here. They are
// taken care of in AdditionalURIsForContextNodex.
if( stmt.getObject().isURIResource() )
return Collections.singletonList( stmt.getObject().as(Resource.class).getURI() );
else
return Collections.emptyList();
List<String> uris = new ArrayList<String>();
if( stmt.getObject().isURIResource() ) {
uris.add(stmt.getObject().as(Resource.class).getURI() );
}
if( stmt.getSubject().isURIResource() ) {
uris.add(stmt.getSubject().as(Resource.class).getURI() );
}
return uris;
}
protected List<String> doDataPropertyStmt(Statement stmt) {