Created
March 30, 2017 13:18
-
-
Save bentedder/b06f9c7a7f2751d40e8f994ec2ff3fda to your computer and use it in GitHub Desktop.
Bool query
This file contains 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
size: limit, | |
query: { | |
bool: { | |
must: { | |
multi_match: { | |
query: term, | |
fields: ['name', 'raw_name'] | |
} | |
}, | |
should: { | |
term: { user_id: current_user.id }, | |
bool: { | |
must_not: { | |
exists: { field: 'user_id' } | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment