AI rule node: improve text search query
This commit is contained in:
parent
e7c971a7bb
commit
ed47569f07
@ -42,8 +42,8 @@ interface AiModelRepository extends JpaRepository<AiModelEntity, UUID>, Exportab
|
|||||||
WHERE model.tenant_id = :tenantId
|
WHERE model.tenant_id = :tenantId
|
||||||
AND (:textSearch IS NULL
|
AND (:textSearch IS NULL
|
||||||
OR model.name ILIKE '%' || :textSearch || '%'
|
OR model.name ILIKE '%' || :textSearch || '%'
|
||||||
OR (model.configuration ->> 'provider') ILIKE '%' || :textSearch || '%'
|
OR REPLACE(model.configuration ->> 'provider', '_', ' ') ILIKE '%' || :textSearch || '%'
|
||||||
OR (model.configuration ->> 'modelId') ILIKE '%' || :textSearch || '%')
|
OR model.configuration ->> 'modelId' ILIKE '%' || :textSearch || '%')
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
@ -51,7 +51,7 @@ interface AiModelRepository extends JpaRepository<AiModelEntity, UUID>, Exportab
|
|||||||
WHERE model.tenant_id = :tenantId
|
WHERE model.tenant_id = :tenantId
|
||||||
AND (:textSearch IS NULL
|
AND (:textSearch IS NULL
|
||||||
OR model.name ILIKE '%' || :textSearch || '%'
|
OR model.name ILIKE '%' || :textSearch || '%'
|
||||||
OR (model.configuration ->> 'provider') ILIKE '%' || :textSearch || '%'
|
OR REPLACE(model.configuration ->> 'provider', '_', ' ') ILIKE '%' || :textSearch || '%'
|
||||||
OR (model.configuration ->> 'modelId') ILIKE '%' || :textSearch || '%')
|
OR (model.configuration ->> 'modelId') ILIKE '%' || :textSearch || '%')
|
||||||
""",
|
""",
|
||||||
nativeQuery = true
|
nativeQuery = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user