カテゴリ has_many 製品。
category_index で、次のように定義しました。
indexes :title
has products(:id), :as => :product_ids
product_index で、次のように定義しました。
indexes :title
サーチャークラスでは:
product_ids = Product.search_for_ids('word', with: {user_id: 5})
categories = Category.search('word')
categories_where_products_match = Category.search(with: {product_ids: products_ids})
categoriesとcategories_where_products_matchを 1 つのThinkingSphinx::Searchオブジェクトにマージするにはどうすればよいですか?