No results found for simple index

I have a collection (allUsers):

{
  name: "allUsers",
  unique: false,
  serialized: true,
  source: "User",
  values: [
    {
      field: ["data", "active"]
    },
    {
      field: ["data", "user_name"]
    },
    {
      field: ["data", "ethaddress"]
    },
    {
      field: ["data", "description"]
    },
    {
      field: ["data", "email"]
    },
    {
      field: ["data", "mobile"]
    }
  ]
}

and an index on that collection:

{
  name: "usernameFromEthaddress",
  unique: true,
  serialized: true,
  source: "User",
  terms: [
    {
      field: ["data", "ethaddress"]
    }
  ],
  values: [
    {
      field: ["data", "username"]
    }
  ]
}

Searching on a valid string in the dashboard I get:

NO RESULTS FOUND
No results found for the index "usernameFromEthaddress"

I checked that the address value used in the search is unique.
How do I retrieve a unique ‘username’ field value given an ‘ethaddress’ value with the usernameFromEthaddress index?

Seems like that should work from what I can see.
Is the username defined since an index will not pick up documents for which all their values are null… … and while typing this I found the error :slight_smile:

Look at the username spelling in the index, your data says: “user_name”, the index “username”.

1 Like

Thanks, it caused a few knock on effects that I had to deal with but that fixed it.