Skip to content

Commit

Permalink
fix: corrected regression after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tglman committed Sep 27, 2024
1 parent 6cde802 commit 490ad93
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.orientechnologies.orient.core.db.record.OIdentifiable;
import com.orientechnologies.orient.core.id.ORID;
import com.orientechnologies.orient.core.index.OIndex;
import com.orientechnologies.orient.core.record.OElement;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.executor.OResult;
import com.orientechnologies.orient.core.sql.executor.OResultInternal;
Expand Down Expand Up @@ -58,10 +57,6 @@ public Object execute(
}
OResult result = (OResult) iThis;

if (!result.getElement().isPresent()) return false;
OElement element = result.getElement().get();
if (!element.getSchemaType().isPresent()) return false;

String indexName = (String) params[0];

OLuceneFullTextIndex index = searchForIndex(ctx, indexName);
Expand All @@ -74,7 +69,7 @@ public Object execute(

List<Object> key =
index.getDefinition().getFields().stream()
.map(s -> element.getProperty(s))
.map(s -> result.getProperty(s))
.collect(Collectors.toList());

for (IndexableField field : index.buildDocument(key).getFields()) {
Expand Down

0 comments on commit 490ad93

Please sign in to comment.