Filter certain docs

I'm searching some users, and want to only search within those that I'm
connected to on Facebook. As part of the search query, I'm sending in an
array of my connections, but I'm not getting back any results. Should I be
using something other than filter :terms?

{ :filter=>{ :terms=>{ :fb_user_id => ["120139", "503009"....] } } }

The issues is that fb_user_id is a string field within each user and most
examples I see have the terms field that you would search against being an
Array like "Tags".

Thanks,
Brandon

I realized I'm having trouble because I have 2 filters, and by default,
they are "and", and to get good results, I need them to be "or".

What's the difference between doing a "filtered" query (
Elasticsearch Platform — Find real-time answers at scale | Elastic)
and applying a filter for the people we know, and just adding a filter
clause to a single query with
Elasticsearch Platform — Find real-time answers at scale | Elastic?

On Wednesday, May 16, 2012 8:28:44 PM UTC-4, Brandon Hilkert wrote:

I'm searching some users, and want to only search within those that I'm
connected to on Facebook. As part of the search query, I'm sending in an
array of my connections, but I'm not getting back any results. Should I be
using something other than filter :terms?

{ :filter=>{ :terms=>{ :fb_user_id => ["120139", "503009"....] } } }

The issues is that fb_user_id is a string field within each user and most
examples I see have the terms field that you would search against being an
Array like "Tags".

Thanks,
Brandon