title: ArangoDB Indexes and arrays
body: <p>I am trying use document collection for fast lookup, sample document
  document Person {</p>
  
  <pre><code>...
  groups: ["admin", "user", "godmode"],
  contacts: [
     {
       label: "main office",
       items: [
          { type: "phone", value: '333444222' },
          { type: "phone", value: '555222555' },
          { type: "email", value: 'bob@gmail.com' }
       ]
     }
  ]
  ...
  }
  </code></pre>
  
  <ol>
  <li><p>Create Hash index for "groups" field</p>
  
  <p>Query: <code>For P in Person FILTER "admin" IN P.groups RETURN P</code>
  Result: Working, BUT No index used via explain query
  Question: How use queries with arrays filter and indexes ? performance is main factor</p></li>
  <li><p>Create Hash index for "contacts[<em>].items[</em>].value"</p>
  
  <p>Query: <code>For P in Person FILTER "333444222" == P.contacts[*].items[*].value RETURN P</code>
  Result: Double usage of wildcard not supported?? Index not used, query empty
  Question: How organize fast lookup with for this structure with indexes ? </p></li>
  </ol>
  
  <p>P.S. also tried MATCHES function, multi lever for-in, hash indexed for arrays never used
  ArangoDB version 2.6.8</p>