Hi Andrey, I am trying to accomplish the same task without directly using the indexes by the following query:
select from followedBy where in in (select @rid from Word where value='Test' ) However, the query is much slower compared to explicitly querying the indexes. What I am trying to achieve is to get all the words that have a followedBy edge to the Word with value property equal to 'Test'. Best Regards On Monday, September 1, 2014 7:41:33 PM UTC+2, Andrey Lomakin wrote: > > Hi, > We do not support complex queries for indexes, index: queries are old and > are not evolved for a long time. > > But if you write queries by indexed fields they indexes are used in > implicit way. > > Which query do you want to create could you explain in terms of domain > model ? > > > On Mon, Sep 1, 2014 at 1:44 PM, Reza Roohian <[email protected] > <javascript:>> wrote: > >> I have a Word vertex type with value and freq properties and followedBy >> edge type which connects Words together. I also defined an index ` >> indexWordValue` on Word 'value' property and `indexFollowedBy_in` on the >> edge's `in` property. >> >> I need to use a subquery to get the values to be searched against my >> words index: >> >> select from index:indexFollowedBy_in where Key in (select from >> index:indexWordValue >> where Key='Test') >> >> But I get this message: >> >> java.lang.ClassCastException: com.orientechnologies.orient.core.sql.query >> .OSQLSynchQuery cannot be cast to com.orientechnologies.orient.core.db. >> record.OIdentifiable >> >> I also tried these but no luck: >> select from index:indexFollowedBy_in where Key = (select rid.asString() >> from index:indexWordValue where Key='Test') >> >> select (select from index:indexFollowedBy_in where Key = $a) let $a = ( >> select flatten(rid) from index:indexWordValue where key='Test') >> >> Is this supported in OrientDB? if yes how? >> >> -- >> >> --- >> 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] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Best regards, > Andrey Lomakin. > > Orient Technologies > the Company behind OrientDB > > -- --- 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/d/optout.
