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

[SEARCH] Error on highlight query with empty value #9134

Closed
mpomet opened this issue Feb 11, 2020 · 3 comments
Closed

[SEARCH] Error on highlight query with empty value #9134

mpomet opened this issue Feb 11, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@mpomet
Copy link

mpomet commented Feb 11, 2020

OrientDB Version: 3.0.27

OS: linux (docker image)

Expected behavior

Using highlight in SEARCH_CLASS should work even if a value is null.

Actual behavior

Using highlight in SEARCH_CLASS return an error if an indexed field has null/empty value.
java.lang.IllegalArgumentException: Field title in document is not stored and cannot be analyzed

Steps to reproduce

CREATE CLASS MyClass EXTENDS V;
CREATE PROPERTY MyClass.title STRING;
CREATE PROPERTY MyClass.description STRING;

CREATE INDEX MyClass.fulltxtindex ON MyClass(title, description) FULLTEXT ENGINE LUCENE;

INSERT INTO MyClass (description) VALUES ("Test 1 !");

SELECT $title_hl, $description_hl FROM MyClass
WHERE SEARCH_CLASS("test", {
    "highlight": {
        "fields": ["title", "description"]
    }
}) = true
@luigidellaquila
Copy link
Member

@wolf4ood any idea?

@wolf4ood wolf4ood self-assigned this Feb 12, 2020
@wolf4ood wolf4ood added the bug label Feb 12, 2020
@wolf4ood
Copy link
Member

Hi @luigidellaquila @mpomet

let me check

wolf4ood added a commit that referenced this issue Feb 12, 2020
@wolf4ood
Copy link
Member

Hi @mpomet

i've just pushed a fix. It will be available in the next 3.0.29 GA release.

Thanks

@wolf4ood wolf4ood added this to the 3.0.29 milestone Feb 12, 2020
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

3 participants