Try using getVertices instead

> g.getVertices("name", "Messenger")


this assumes the index is on V, if the index is not on V I think you must 
explicitly specify the class

> g.getVertices("User.name", "Messenger")

 
This is documented here (kinda hard to find, took me a while):
http://orientdb.com/docs/last/Graph-Database-Tinkerpop.html

I think you can query edge indices using getEdges.  I'm not sure how to do 
range queries.

I know of no way to know if an index was used (like "explain" tells you for 
osql).

If anyone knows how to get information of if an index was used please post!!


On Thursday, May 7, 2015 at 12:54:47 PM UTC-7, Elad wrote:
>
> Hi,
>
> I use the REST API with OrientDB 2.0.8
> I have a "User" class with index on the field "name"
>
> Recently when I run the following query on a new records, the query became 
> slow.
> g.query().labels("User").has("name", "Messenger").vertices()
>  
> Can you please advice if this query uses the index?
> If not, how can I query by index in this case?
>
> Thanks,
> Elad
>

-- 

--- 
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.

Reply via email to