Skip to content

Subqueries using LET not working as expected when LUCENE index involved #8521

@misu200

Description

@misu200

OrientDB Version: 3.0.7

Java Version: 1.8.0_181

OS: Ubuntu 16.04

When the WHERE part of a SELECT is using a LUCENE index the context variables from LET not working as expected.

I ve created the following simple database test:

create class A extends V;
create property A.name  string;
create index A.nameLucene on A(name) fulltext engine LUCENE;
create index A.nameHash ON A (name) NOTUNIQUE_HASH_INDEX;
		   
create class B extends V;
create class X extends E;								  
let $a = create vertex A set name="Mike";
let $b = create vertex B;
create edge X from $a to $b;

When using a LUCENE index the $t is always empty ( [] ) :
select $t,* from A let $t=(select * from (select expand($parent.$parent.$current.out()))) where SEARCH_CLASS("Mike") = true;

Similar query but replacing LUCENE with a different index type returns the expected non empty value for $t :
select $t,* from A let $t=(select * from (select expand($parent.$parent.$current.out()))) where name="Mike";

Thanks,
Mihai

Metadata

Metadata

Labels

buglegacy not used anymore

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions