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 i cant search float type (even if in the schema) #7644

Closed
publicocean0 opened this issue Aug 10, 2017 · 7 comments
Closed

lucene i cant search float type (even if in the schema) #7644

publicocean0 opened this issue Aug 10, 2017 · 7 comments
Assignees

Comments

@publicocean0
Copy link

publicocean0 commented Aug 10, 2017

OrientDB Version: 3

Java Version: 8

+----+------+------+-----+----+----+
|# |@Rid |@Class|aa |qqq |ww |
+----+------+------+-----+----+----+
|0 |#48:16|A |false|5 | |
|1 |#48:17|A |false|5 |5.7 |
|2 |#48:19|A |false|5 |5.7 |
+----+------+------+-----+----+----+

select from a where search_class('ww:5.7')=true
0
select from a where search_class('ww:{2.1 TO *}')=true
0

@publicocean0 publicocean0 changed the title lucene i cant search float type lucene i cant search float type (even if in the schema) Aug 10, 2017
@orientdb-builder
Copy link
Contributor

Can you post the schema and the command used to create the index, please?

BTW, range queries use square brackets:

http://orientdb.com/docs/3.0.x/indexing/Full-Text-Index.html#numeric-and-date-range-queries

@orientdb-builder orientdb-builder self-assigned this Aug 10, 2017
@publicocean0
Copy link
Author

A.aa_ww_qq_qqq_ee_from FULLTEXT ["aa","ww","qq","qqq","ee","from"] LUCENE

@publicocean0
Copy link
Author

publicocean0 commented Aug 10, 2017

[ or { might be the same. Anyway ....select from a where search_class('ww:[2.1 TO *]')=true

0 item(s) found. Query executed in 0.006 sec(s).

@publicocean0
Copy link
Author

istantanea_2017-08-10_16-50-46

@robfrank
Copy link
Contributor

I think a range query with a wildcard can't work. What's the right part of the range?

@publicocean0
Copy link
Author

publicocean0 commented Aug 10, 2017

  • is the lucene way for telliing infinite. In the last versions you can use also >= 1. Anyway
    select from a where search_class('ww:[2.1 TO 6]')=true

0 item(s) found. Query executed in 0.002 sec(s).

If you use lucene >=6 there is a different way for mapping numbers . They use Points

robfrank added a commit that referenced this issue Aug 28, 2017
@robfrank
Copy link
Contributor

problem fixed, specific test added

robfrank added a commit that referenced this issue Aug 28, 2017
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