Skip to content

SQL: "SEARCH_INDEX" and "SEARCH_FIELDS" are not propagating return value in filters #4023

Description

@gramian

ArcadeDB Server v26.5.1-SNAPSHOT (build ae23a5defc82c4dceb6480332b41ef4eb0ee4a16/1777392960532/main)

Running on Mac OS X 15.7.3 - OpenJDK 64-Bit Server VM 25.0.2 (Homebrew)

Using SEARCH_INDEX or SEARCH_FIELDS in a filter requires to compare to a boolean, which is not necessary.

Given this setup:

CREATE DOCUMENT TYPE Doc;
CREATE PROPERTY Doc.txt STRING;
CREATE INDEX ON Doc (txt) FULL_TEXT;

These result in an error:

SELECT FROM Doc WHERE SEARCH_INDEX('Doc[txt]','what')
SELECT FROM Doc WHERE SEARCH_FIELDS(['txt'],'what')

while these work:

SELECT FROM Doc WHERE SEARCH_INDEX('Doc[txt]','what') = true
SELECT FROM Doc WHERE SEARCH_FIELDS(['txt'],'what') = true

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions