Okay, looks like everything after OR was excessive.
Query works in this shape
select from index:relations where key = [ :target, :src ]
Using index, performance improved 10 times.
Not bad.
On Thursday, March 6, 2014 10:41:55 AM UTC-5, Andrey Yesyev wrote:
>
> I'll proceed with my search.
>
> Now, I try to use index for edge, here is how I created it
>
> OrientEdgeType edgeType = graph.createEdgeType(RelationType.RELATED.name
> ());
> edgeType.createProperty("in", OType.LINK);
> edgeType.createProperty("out", OType.LINK);
> edgeType.createIndex("relations", OClass.INDEX_TYPE.UNIQUE, "in", "out");
>
> so, I changed my query to use this index
>
> select from index:relations where Key = [ :target, :src ] or Key = [ :src,
> :target ]
>
> but execution of this query throws an exception
>
> com.orientechnologies.orient.core.exception.OCommandExecutionException:
> 'Key' field is required for queries against indexes
> at
> com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchInIndex(OCommandExecutorSQLSelect.java:1127)
> at
> com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.assignTarget(OCommandExecutorSQLSelect.java:358)
> at
> com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:330)
> at
> com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:315)
> at
> com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:57)
> at
> com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:96)
>
> What's wrong with it?
>
>
>
>
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.