Skip to content

Instantly share code, notes, and snippets.

@jmb13562
Last active July 26, 2019 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmb13562/f8f61dcf91fda92ac0f85bb7a657c43b to your computer and use it in GitHub Desktop.
Save jmb13562/f8f61dcf91fda92ac0f85bb7a657c43b to your computer and use it in GitHub Desktop.
Elastic Query
GET sharepointschematest/_search
{
"aggs": {},
"from": 0,
"highlight": {
"fields": {
"FileContent": {},
"FileContent.author": {},
"FileContent.title": {},
"FileContent.content"
},
"number_of_fragments": 3,
"post_tags": [
"</c0>"
],
"pre_tags": [
"<c0>"
],
"require_field_match": false
},
"query": {
"bool": {
"must": [
{
"query_string": {
"default_operator": "and",
"query": "Random Name",
"type": "best_fields"
}
}
]
}
},
"size": 10,
"sort": [
{
"_score": {
"order": "desc"
}
}
],
"_source": {
"excludes": [
"FileContentRaw"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment