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

Lucene Spatial return invalid result #4820

Closed
martingg88 opened this issue Aug 19, 2015 · 2 comments
Closed

Lucene Spatial return invalid result #4820

martingg88 opened this issue Aug 19, 2015 · 2 comments
Assignees
Milestone

Comments

@martingg88
Copy link

i found out a bug as follows:

select *, distance(lat, lng, 3.1333, 101.3833)
from (SELECT EXPAND(OUT("target")) FROM #45:6)
where distance(lat, lng, 3.1333, 101.3833) <= 100

--- return a set of correct result

select *, distance(lat, lng, 3.1333, 101.3833)
from (SELECT EXPAND(OUT("target")) FROM #45:6)
where [lat, lng, $spatial] NEAR [3.1333, 101.3833, {'maxDistance' : 100}]

------- return nothing/empty result

@lvca lvca added this to the 2.1.1 milestone Aug 19, 2015
@wolf4ood
Copy link
Member

Hi @martingg88

the second one do not works because the lucene spatial index is not used.
In order to use the spatial index the target of From must be a class.
In your case the target is a subquery

(SELECT EXPAND(OUT("target")) FROM #45:6)

I will fix it to evaluate the expression in via java (full scan) but it will not use the spatial index.

@martingg88
Copy link
Author

thanks. let me know once u fix it. thanks.

wolf4ood added a commit to orientechnologies/orientdb-lucene that referenced this issue Aug 21, 2015
wolf4ood added a commit to orientechnologies/orientdb-lucene that referenced this issue Aug 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants