Index Creates Multiple Results for Field that is Array

All of my documents have a structure like the following examples:

  "id": "99990"
  "name": "abc"
  "point":  [1,2]
  "id": "99991"
  "name": "def"
  "point":  [3,4]

I have the following index:

  name: "mycollection_VALUES_name_point_id",
  unique: false,
  serialized: true,
  source: "mycollection",
  values: [
      field: ["data", "name"]
      field: ["data", "point"]
      field: ["data", "id"]

This index shows two entries for each document, apparently because point is an array of length 2 like this:


Is there something I can adjust so that the index provides a single result for each document with the point array intact like so?



You could use a binding to make a string representation of the array, and index that. Otherwise, that’s how Fauna’s indexes provides alternatives, or tags.