How to create an indexed EmbeddedList for a list of names

25 views
Skip to first unread message

Curtis Mosters

unread,
Feb 8, 2015, 5:33:05 AM2/8/15
to orient-...@googlegroups.com
I mean I would like to create a class Person. And a Person shall have a property subnames. There the alternative names of that person shall be stored.

I also would like to set an index on them.

Is the EmbeddedList the best choice for this or is there anything similar to this? 

If possible please post all the SQL commands for that. I'm new to all the embedded things of OrientDB.

Thanks.

Curtis Mosters

unread,
Feb 8, 2015, 6:15:00 AM2/8/15
to orient-...@googlegroups.com
I manage to get it working with: select subnames from Person where subnames containstext 'name'

Is this the way to go?

But it seems that he is using the index. Is that right?

{
   
"result": [
       
{
           
"@type": "d",
           
"@version": 0,
           
"limit": -1,
           
"involvedIndexes": [
               
"person.subnames"
           
],
           
"current": "#13:6",
           
"evaluated": 2,
           
"fetchingFromTargetElapsed": 0,
           
"documentReads": 2,
           
"documentAnalyzedCompatibleClass": 2,
           
"recordReads": 2,
           
"elapsed": 23.784271,
           
"resultType": "collection",
           
"resultSize": 1,
           
"@fieldTypes": "involvedIndexes=e,current=x,evaluated=l,fetchingFromTargetElapsed=l,documentReads=l,documentAnalyzedCompatibleClass=l,recordReads=l,elapsed=f"
       
}
   
],
   
"notification": "Query executed in 0.119 sec. Returned 1 record(s)"
}

Reply all
Reply to author
Forward
0 new messages