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 doesn't create index on string fields with MAX constraint #6149

Closed
laszlothewiz opened this issue May 17, 2016 · 4 comments
Closed

Lucene doesn't create index on string fields with MAX constraint #6149

laszlothewiz opened this issue May 17, 2016 · 4 comments
Assignees
Labels

Comments

@laszlothewiz
Copy link

laszlothewiz commented May 17, 2016

Expected behavior and actual behavior

Expected: Lucene should create an index on all fields regardless of what constraints are on them, OR throw an error if it can't create it for some reason

Actual: Lucene works properly when no constraints are given for a field. When, for example MAX, constraint is added to a string field then it fails to create indexes and throws no errors

Steps to reproduce the problem

In an empty database:

CREATE CLASS test
CREATE PROPERTY test.field1 STRING
CREATE PROPERTY test.field2 STRING
ALTER PROPERTY test.field2 MAX 8
CREATE PROPERTY test.field3 STRING
CREATE PROPERTY test.field4 STRING
INSERT INTO test CONTENT {"field1":"One", "field2":"Two", "field3":"Three", "field4":"Four"}
INSERT INTO test CONTENT {"field1":"Five", "field2":"Six", "field3":"Seven", "field4":"Eight"}

CREATE INDEX test.field1 on test(field1) fulltext engine lucene
SELECT count(*) FROM index:test.field1

Result: count=2 which is correct

CREATE INDEX test.field2 on test(field2) fulltext engine lucene
SELECT count(*) FROM index:test.field2

Result: count=0 which is incorrect!

Important Questions

Runninng Mode

Standard Windows install running server at default port accessed via Studio in browser

Misc

Single computer setup.

OrientDB Version

v2.1.16

Operating System

Windows 7 x64

Java Version

Java 8 Update 91

@wolf4ood
Copy link
Member

hi @laszlothewiz

just tested on orientdb 2.1.16 using your script with studio and it worked.

You are using it in embedded mode right?

If you try it in server mode does it work?

@laszlothewiz
Copy link
Author

I'm not sure what the embedded or server mode means. I selected the option that made sense to me out of the 3 choices.

I downloaded the Windows installation and running it without any configuration change. Using the Studio in my browser.

@robfrank
Copy link
Contributor

Even for me it works fine on studio.

@laszlothewiz
Copy link
Author

Sorry. Somehow my installation must have gotten corrupt. It was doing it each time for me.

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

5 participants