Created
December 6, 2019 12:02
-
-
Save dnek/0f10d7b5a2565b1eac5d23aa25bbc922 to your computer and use it in GitHub Desktop.
ElasticSearch random search
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
const result = await client.search({ | |
index: 'xxx', | |
body: { | |
query: { | |
function_score: { | |
random_score: {} | |
} | |
}, | |
size: 5 | |
} | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment