Skip to content

Error with containstext against an indexed property #1062

@marco-brandizi

Description

@marco-brandizi

ArcadeDB Version: 23.3.1

JDK Version: OpenJDK 64-Bit Server VM Temurin-11.0.18+10 (build 11.0.18+10, mixed mode)

OS: macos 13.3 (22E252)

Expected behavior

(I've done all of the operations described in the follow from the studio web app)

I'm new to ArcadeDB and so far I've managed to import a graph database from a .graphml file. Then, while playing with indexes, I tried this:

# These two went fine
create property `Person:Resource`.`label` string
create index on `Person:Resource` ( `label` ) full_text

# This failed
select * from `Person:Resource` where `label` containstext 'John'

the select fails with the, while I was expecting some result.

Actual behavior

It fails with the following:

<ArcadeDB_0> Error on command execution (PostCommandHandler)
java.lang.UnsupportedOperationException: Cannot execute index query with `label` CONTAINSTEXT 'John'
	at com.arcadedb.query.sql.parser.BooleanExpression.resolveKeyFrom(BooleanExpression.java:203)
	at com.arcadedb.query.sql.executor.FetchFromIndexStep.indexKeyFrom(FetchFromIndexStep.java:537)
	at com.arcadedb.query.sql.executor.FetchFromIndexStep.processAndBlock(FetchFromIndexStep.java:280)
	at com.arcadedb.query.sql.executor.FetchFromIndexStep.init(FetchFromIndexStep.java:208)
	at com.arcadedb.query.sql.executor.FetchFromIndexStep.init(FetchFromIndexStep.java:192)
	at com.arcadedb.query.sql.executor.FetchFromIndexStep.syncPull(FetchFromIndexStep.java:85)
	at com.arcadedb.query.sql.executor.GetValueFromIndexEntryStep$1.fetchNextItem(GetValueFromIndexEntryStep.java:101)
	at com.arcadedb.query.sql.executor.GetValueFromIndexEntryStep$1.hasNext(GetValueFromIndexEntryStep.java:71)
	at com.arcadedb.query.sql.executor.DistinctExecutionStep.fetchNext(DistinctExecutionStep.java:93)
	at com.arcadedb.query.sql.executor.DistinctExecutionStep$1.hasNext(DistinctExecutionStep.java:61)
	at com.arcadedb.query.sql.executor.FilterByClassStep$1.fetchNextItem(FilterByClassStep.java:59)
	at com.arcadedb.query.sql.executor.FilterByClassStep$1.hasNext(FilterByClassStep.java:97)
	at com.arcadedb.query.sql.executor.ProjectionCalculationStep$1.hasNext(ProjectionCalculationStep.java:43)
	at com.arcadedb.query.sql.parser.LocalResultSet.fetchNext(LocalResultSet.java:46)
	at com.arcadedb.query.sql.parser.LocalResultSet.<init>(LocalResultSet.java:39)
	at com.arcadedb.query.sql.parser.SelectStatement.execute(SelectStatement.java:207)
	at com.arcadedb.query.sql.parser.Statement.execute(Statement.java:85)
	at com.arcadedb.query.sql.parser.Statement.execute(Statement.java:69)
	at com.arcadedb.query.sql.SQLQueryEngine.command(SQLQueryEngine.java:97)
	at com.arcadedb.database.EmbeddedDatabase.command(EmbeddedDatabase.java:1264)
	at com.arcadedb.server.ServerDatabase.command(ServerDatabase.java:421)
	at com.arcadedb.server.http.handler.PostCommandHandler.executeCommand(PostCommandHandler.java:127)
	at com.arcadedb.server.http.handler.PostCommandHandler.execute(PostCommandHandler.java:88)
	at com.arcadedb.server.http.handler.DatabaseAbstractHandler.execute(DatabaseAbstractHandler.java:92)
	at com.arcadedb.server.http.handler.AbstractHandler.handleRequest(AbstractHandler.java:127)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
	at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
	at java.base/java.lang.Thread.run(Thread.java:829)

Am I doing something wrong? Essentially, I'm trying to understand how to efficiently search with partial text matches. Actually, I need to do it from Gremlin, but for the moment, I'd like to make it work at least using SQL.

Steps to reproduce

See above

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions