Support weight in query() in sub_filter()

The following sub_filter() and query() works with this change:

  select Users \
    --filter 'sub_filter(a.b, "query(\\"T1.index * 20 || T2.index * 5\\", \\"KEYWORD\\")")'