nebula简单条件查询,没查出数据

如图,图片最下面是我这tag的数据,上面是查询语句为啥报错


而且用下面写法为啥查不出数据

涉及到全表扫,需要建下索引
建完索引记得 rebuild 下

所有可能查询的属性都需要创建索引吗?不创建索引不是只查询的慢吗


这三个语句为啥中间使用where查询不出数据呢?已经创建了索引

这是我的数据结构和索引,nebula版本3.8.0,nebula studio版本3.3.2


CREATE TAG IF NOT EXISTS CiBase (
id int64,
ciNo string,
primaryKey int64,
name string,
ciClass string,
ciClassNode string,
createTimestamp int64,
importFrom string,
createUser string,
lastChangeTimestamp int64,
comment string,
isDefault bool,
sourceIp string,
isMonitor bool,
projectCode string,
customerCode string,
otherProperties string
);

– 为每个属性创建索引
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_id ON CiBase(id);
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_ciNo ON CiBase(ciNo(200));
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_primaryKey ON CiBase(primaryKey);
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_name ON CiBase(name(200));
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_ciClass ON CiBase(ciClass(200));
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_ciClassNode ON CiBase(ciClassNode(200));
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_createTimestamp ON CiBase(createTimestamp);
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_importFrom ON CiBase(importFrom(200));
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_createUser ON CiBase(createUser(200));
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_lastChangeTimestamp ON CiBase(lastChangeTimestamp);
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_comment ON CiBase(comment(200));
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_isDefault ON CiBase(isDefault);
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_sourceIp ON CiBase(sourceIp(200));
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_isMonitor ON CiBase(isMonitor);
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_projectCode ON CiBase(projectCode(200));
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_customerCode ON CiBase(customerCode(200));
CREATE TAG INDEX IF NOT EXISTS idx_CiBase_otherProperties ON CiBase(otherProperties(200));

– 重建所有索引(使新索引生效)
REBUILD TAG INDEX idx_CiBase_id;
REBUILD TAG INDEX idx_CiBase_ciNo;
REBUILD TAG INDEX idx_CiBase_primaryKey;
REBUILD TAG INDEX idx_CiBase_name;
REBUILD TAG INDEX idx_CiBase_ciClass;
REBUILD TAG INDEX idx_CiBase_ciClassNode;
REBUILD TAG INDEX idx_CiBase_createTimestamp;
REBUILD TAG INDEX idx_CiBase_importFrom;
REBUILD TAG INDEX idx_CiBase_createUser;
REBUILD TAG INDEX idx_CiBase_lastChangeTimestamp;
REBUILD TAG INDEX idx_CiBase_comment;
REBUILD TAG INDEX idx_CiBase_isDefault;
REBUILD TAG INDEX idx_CiBase_sourceIp;
REBUILD TAG INDEX idx_CiBase_isMonitor;
REBUILD TAG INDEX idx_CiBase_projectCode;
REBUILD TAG INDEX idx_CiBase_customerCode;

INSERT VERTEX CiBase(
id, ciNo, primaryKey, name, ciClass, ciClassNode,
createTimestamp, importFrom, createUser, lastChangeTimestamp,
comment, isDefault, sourceIp, isMonitor, projectCode,
customerCode, otherProperties
)
VALUES “vertex_011”:frowning:
111, “vertex_011”, 12345, “vertex_011”, “Hardware”, “Physical”,
1689291000, “API”, “admin”, 1689384600,
“Production server”, true, “192.168.1.100”, true, “PROJ-001”,
“CUST-789”, ‘{“location”:“rackA”,“status”:“active”,“a”:“a1”}’
);

INSERT VERTEX CiBase(
id, ciNo, primaryKey, name, ciClass, ciClassNode,
createTimestamp, importFrom, createUser, lastChangeTimestamp,
comment, isDefault, sourceIp, isMonitor, projectCode,
customerCode, otherProperties
)
VALUES “vertex_012”:frowning:
111, “vertex_012”, 12345, “vertex_012”, “Hardware”, “Physical”,
1689291000, “API”, “admin”, 1689384600,
“Production server”, true, “192.168.1.100”, true, “PROJ-001”,
“CUST-789”, ‘{“location”:“rackA”,“status”:“active”,“a”:“a2”}’
);

INSERT VERTEX CiBase(
id, ciNo, primaryKey, name, ciClass, ciClassNode,
createTimestamp, importFrom, createUser, lastChangeTimestamp,
comment, isDefault, sourceIp, isMonitor, projectCode,
customerCode, otherProperties
)
VALUES “vertex_013”:frowning:
111, “vertex_013”, 12345, “vertex_013”, “Hardware”, “Physical”,
1689291000, “API”, “admin”, 1689384600,
“Production server”, true, “192.168.1.100”, true, “PROJ-001”,
“CUST-789”, ‘{“location”:“rackA”,“status”:“active”,“a”:“a2”}’
);

需要作为初始查询条件的才需要建索引,如果只是过滤的,不需要
按理来说是的,但是之前的设计为了避免对系统产生影响,直接禁用了

应该用 c.CiBase.name