Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
misu200 opened this issue Sep 8, 2018 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@misu200
Copy link

misu200 commented Sep 8, 2018

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

@luigidellaquila luigidellaquila self-assigned this Sep 10, 2018
@luigidellaquila
Copy link
Member

Hi @misu200

Thank you very much for reporting, I managed to reproduce the problem.
I'm testing a fix now, I'll let you know ASAP

Thanks

Luigi

@luigidellaquila luigidellaquila added this to the 3.0.8 milestone Sep 10, 2018
@luigidellaquila
Copy link
Member

Hi @misu200

I just pushed a fix on 3.0.x branch, it will be released with V 3.0.8

Thanks

Luigi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants