I'm using OrientDB 2.1.11 and rexster 2.6 and gremlin is the main query 
language. I use via rexpro (and rexster REST). My issue is: how to get the 
indexes to hit from gremlin (I must use gremlin not orient sql).

I have a vertex class zipcode, which has 1 property zip_code defined in 
schema and indexed as dictionary:

zipcode.zip_code    DICTIONARY  ["zip_code"]    SBTREE 

But when I query it using gremlin, its slow when records are around >25k 
(haven't tested with lower numbers). To give proper context, I try to find 
the zipcode first, if it doesn't exist then I create the vertex for later 
use. Find query goes like this:

g.V('@class', 'zipcode').has('zip_code','10018')

Question: Is g.V('@class'... hitting indexes? Is it not going over 1000000 
objects of V? Is there a way to write it better to be more efficient for my 
vertex class i.e. zipcode? I just need to match a property of vertices in 
my class (zipcode).

Is it better to use has('zip_code', '12345') or filter {it.zip_code == 
'12345'}? Which one would hit the index created?

What if I have to match more than 1 properties to match against:

.has('zip_code', '12345').has('state','NY').has('city','NEW YORK') 

would has' hit indexes or 'filter{}'? please advise.


I even tried g.V('zipcode.zip_code', '10018') but it doesn't return any 
records.

-- 

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