Inconsistent behavior between Cypher vs SQL query with one field indexed while other not (original) (raw)
This is related to #1888 which was closed as "question". But this scenario may not be just specific to my use-case.
ArcadeDB Version:
24.11.2
OS and JDK Version:
docker image
Expected behavior
Should fetch a record
Actual behavior
Did not fetched for SQL but Cypher query correct behavior.
Steps to reproduce
SQL script:
CREATE VERTEX TYPE Asset IF NOT EXISTS;
CREATE PROPERTY Asset.id IF NOT EXISTS STRING (mandatory true);
CREATE INDEX IF NOT EXISTS ON Asset (id) UNIQUE;
INSERT INTO Asset CONTENT {"id":"Engineering Workstation1", "addresses":"192.168.10.10,192.168.20.10"};
INSERT INTO Asset CONTENT {"id":"OT Chlorine Process #4"};
select from Asset where id='OT Chlorine Process #4' OR addresses LIKE '%OT Chlorine Process #4%'
works as expected, fetches correct record.
select from Asset where id='192.168.10.10' OR addresses LIKE '192.168.10.10'
no record but it should.
match(n:Asset)
where n.id='192.168.10.10' OR n.addresses CONTAINS '192.168.10.10'
return *
Cypher query fetches the correct record.
When I remove the index for id, the SQL statement works.
