-
-
Save fvbock/c66b25f9574cbdd41618a9ac70ed8976 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client = ElasticWrapper::Session.new.client | |
client.search(index: 'test', type: 'contacts', body: body) | |
body = { query: { bool: { filter: { term: { name: 'lachlan' } } } } } | |
=> | |
[{ | |
"_index"=>"test", | |
"_type"=>"contact", | |
"_id"=>"1", | |
"_score"=>1.0, | |
"_source"=>{ | |
"id"=>2157, | |
"name"=>"Lachlan Priest" | |
} | |
}] | |
body = { query: { bool: { filter: { term: { name: 'Lachlan' } } } } } | |
=> | |
[] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment