Skip to content

Commit

Permalink
fix: correct query engine issue with lucene module
Browse files Browse the repository at this point in the history
  • Loading branch information
tglman committed Nov 8, 2023
1 parent c94154e commit 95fc4c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ private OExpression fieldNamesToStrings(OExpression left) {
} else if (left.mathExpression instanceof OBaseExpression) {
OBaseExpression base = (OBaseExpression) left.mathExpression;
if (base.getIdentifier() != null
&& base.getIdentifier() != null
&& base.getIdentifier().levelZero != null
&& base.getIdentifier().levelZero.collection != null) {
OCollection coll = base.getIdentifier().levelZero.collection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public Iterable<OIdentifiable> searchFromTarget(
OLuceneFullTextIndex index = searchForIndex(target, ctx, args);

OExpression expression = args[1];
String query = (String) expression.execute((OIdentifiable) null, ctx);
Object query = expression.execute((OIdentifiable) null, ctx);
if (index != null) {

ODocument meta = getMetadata(args, ctx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ public String asText(ODocument document) {
@Override
public String asText(Object obj) {

if (obj instanceof OResult) {
OElement oElement = ((OResult) obj).toElement();
return asText((ODocument) oElement);
}
if (obj instanceof ODocument) {
return asText((ODocument) obj);
}
Expand Down

0 comments on commit 95fc4c0

Please sign in to comment.