getValues() from OIndex is gone in latest SNAPSHOT

21 views
Skip to first unread message

ste...@activitystream.com

unread,
Apr 24, 2014, 3:09:02 AM4/24/14
to orient-...@googlegroups.com
Hi,

the getValues() method has been removed from OIndex.

What is the new alternative?

Regards,
  -Stefán

Andrey Lomakin

unread,
Apr 24, 2014, 4:09:31 AM4/24/14
to orient-database
Hi,

You should use cursor returned by instead iterateEntries.
It provides more efficient way to iterate through index especially if you use pagination.




--

---
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

Andrey Lomakin

unread,
Apr 24, 2014, 4:11:56 AM4/24/14
to orient-database
I can provide you couple of utility methods like 

toValues() and toEntries() so it will be easy for you to use it  application.
Do you use embedded database, do not you ?

ste...@activitystream.com

unread,
Apr 24, 2014, 4:37:44 AM4/24/14
to orient-...@googlegroups.com

Thank you I do.

I have changed my code to match.

Currently I need to calll "OrientVertex oEntity = graph.getVertex(returnedtem.getValue())" to fetch each Vertex/Edge it self.
Is there a more efficient way to do that?

Regards,
  -Stefán

ste...@activitystream.com

unread,
Apr 24, 2014, 4:41:00 AM4/24/14
to orient-...@googlegroups.com
Hi again,

Speaking of utility functions in Java API :).

Is there a way to fetch the nth entry in a edges without iterating through the whole iterator returned by: vertex.getEdges(Direction.OUT, ASModel.REL_PURCHASE)?

I would like to get to the last (most recent) one or iterate it from the bottom up.

Regards,
  -Stefán

Andrey Lomakin

unread,
Apr 24, 2014, 4:46:18 AM4/24/14
to orient-database
Hi yes, 
You are right.
I have add OIndexCursor#toValues, OIndexCursor#toKeys, OIndexCursor#toEntries so you can you them to if you wish.
I will push during 30 min.

ste...@activitystream.com

unread,
Apr 24, 2014, 4:57:56 AM4/24/14
to orient-...@googlegroups.com
thank you :)

Andrey Lomakin

unread,
Apr 24, 2014, 6:20:01 AM4/24/14
to orient-database
Done.
Pagination is better to do using cursor;s next of course. In next you should pass size of your page.

ste...@activitystream.com

unread,
Apr 25, 2014, 11:43:49 AM4/25/14
to orient-...@googlegroups.com
Hi,

Currently I need to calll "OrientVertex oEntity = graph.getVertex(returnedtem.getValue())" to fetch each Vertex/Edge it self.
Is there a more efficient way to do that?

I mean, to retrieve Documents instead of OIdentifiable, or would that not save any time?
Something like ".iterateEntries(references, true).toDocuments()"  ?

Regards,
  -Stefán

Andrey Lomakin

unread,
Apr 25, 2014, 12:20:02 PM4/25/14
to orient-database
Hi,

It works with the same efficiency under the hood.
Reply all
Reply to author
Forward
0 new messages