On 14/08/2014 18:41, Luca Garulli wrote:
Hi Nicolas,
Indexes are transactional. How did you create indexes?
Indexes are lazily created by one of my library constructor. You can see
the code creating an index here :
https://github.com/Riduidel/gaedo/blob/master/gaedo-blueprints/src/main/java/com/dooapp/gaedo/blueprints/indexable/IndexableGraphBackedFinderService.java#L147
As you can see, the #prepareGraph method iterates over an enum of
IndexNames and, for each one, lazily get the index.
In OrientDB test, this metho is invoked over a graph obtained through a
call to OrientGraphFactory#get() method which returns a transacted graph
and, as a consequence, triggers a log message :
18 août 2014 09:12:56 com.orientechnologies.common.log.OLogManager log
ATTENTION: Requested command 'create index 'vertices'' must be executed
outside active transaction: the transaction will be committed and reopen
right after it. To avoid this behavior execute it outside a transaction
How did you lookup on them?
In this precise case, Indexes are navigated through a call to
IndexBrowser, which #getVerticesWithId method obtain the index by
calling IndexableGraph#getIndex
In fact, all index manipulations (putting data in, querying that data,
removing it) are done through the blueprints Index interface.
--
Nicolas Delsaux
--
---
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.