Yup, it is possible
But you need create properties before you add some values to such properties,
other case ODB cant create index for properties that already stored on DB.
Something like that
ItemType type = ItemType.USER;
OrientVertexType ovt = graph.getVertexType(type.getClassName());
IndexedProperty indexProperty = IndexedProperty.EMAIL;
String fieldName = indexProperty.getIndexKey();
String iName = type.getClassName()+"."+fieldName;
ovt.createProperty(fieldName, OType.EMBEDDEDLIST, OType.STRING);
graph.getRawGraph().commit();
ovt.createIndex(iName, INDEX_TYPE.UNIQUE, fieldName);
graph.getRawGraph().commit();
> I am also interested in indexing properites of type EMBEDDEDLIST.
>
> Am Mittwoch, 7. Mai 2014 08:10:40 UTC+2 schrieb Valentin Popov:
> Luca, hi
>
> Is it possible to search in index via such properties, like
> OType.EMBEDDEDLIST contains [admin, administrator, superuser] can I search
> record only by name = admin?
>
> Regards,
> Valentin
>
> вторник, 6 мая 2014 г., 23:45:22 UTC+4 пользователь Lvc@ написал:
> Hi,
> You should call:
>
> g.getVertexType("MyType").createProperty("name", OType.EMBEDDEDLIST,
> OType.STRING);
>
> Lvc@
>
>
> Lvc@
>
>
> On 6 May 2014 20:06, Marc Tigges <[email protected]> wrote:
> Hello,
>
> i need a property for a vertex containing multiple values, so i tried to find
> out
> if i can create something like that. I found this:
>
> this.graph.createProperty(vertexType, "name", OType.EMBEDDEDLIST);
>
> But in the documentation is written:
>
> this is a container and needs the parameter linked-type or linked-class
>
> But i need to store Strings inside the list.
>
> How can i create a property of a type like collection containing strings?
>
> --
>
> ---
> 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.
>
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the Google
> Groups "OrientDB" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/orient-database/xWmAWQOPKwY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
Regards,
Valentin Popov
--
---
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.