How to access an index with two fields

I can access documents from an index with one field

            query_function = query.Map(
                query.Paginate(query.Match(query.Index(index), "fred")),
                (recordRef) => query.Get(recordRef)
            );

But what if the index requires two parameters fred and true? How should the query be written then?

The change required is very simple, use an array:

query_function = query.Map(
  query.Paginate(query.Match(query.Index(index), ["fred", true])),
  (recordRef) => query.Get(recordRef)
);

FQL functions have (mostly) fixed arity, so when you want to pass multiple values, especially to a function that accepts one, you need to use an array.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.