Label query syntax for multiple entries in an array

I’m using this query to list matches with two required usernames:

    local query = "+label.usernames:" .. context.username .. " +label.usernames:" .. payload.username .. " +label.word_count:>0"
    local matches = nk.match_list(limit, authoritative, label, min_size, max_size, query)

It works, but I’m wondering if there is a shorter/more elegant way to check if multiple usernames are part of the “usernames” array?

Hello @totebo, the array syntax shown here should allow you to simplify your query.

Hope this helps.

1 Like