Skip to content

Instantly share code, notes, and snippets.

@robbestad
Created December 12, 2016 13:50
Show Gist options
  • Save robbestad/307201bc4551624ae55f37b3d0e2efd5 to your computer and use it in GitHub Desktop.
Save robbestad/307201bc4551624ae55f37b3d0e2efd5 to your computer and use it in GitHub Desktop.
GET /
POST /current-records/_search
{
"query": {
"match": {
"object.title.edgeCompletion": "morgen"
}
},
"_source": "object.title"
}
GET /current-records/_search
{
"query": {
"bool": {
"must": [
{
"bool": {
"should": [
{
"simple_query_string": {
"query": "her",
"fields": [
"object.title^2"
],
"default_operator": "and"
}
}
]
}
}
]
}
},
"sort": {
"object.title.sortLower": {
"order": "asc"
}
},
"_source": "object.title",
"highlight": {
"pre_tags": [
"[em]"
],
"post_tags": [
"[/em]"
],
"require_field_match": false,
"fields": {
"*.title": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.comment": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.notes": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.label": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.shortDescription": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.description": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.rights": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.progId": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.producer": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.language": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.genre": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.distributor": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.popularTitle": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.intellectualWorkTitle": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.recordNotes": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.firstLine": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.lastLine": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.characterName": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.manuscript": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.nationality": {
"fragment_size": 100,
"number_of_fragments": 0
},
"*.dmaId": {
"fragment_size": 100,
"number_of_fragments": 0
},
"object.parts.titleAllSearchable": {
"fragment_size": 100,
"number_of_fragments": 0
},
"object.parts.commentAllSearchable": {
"fragment_size": 100,
"number_of_fragments": 0
},
"object.parts.descriptionAllSearchable": {
"fragment_size": 100,
"number_of_fragments": 0
},
"object.parts.shortDescriptionAllSearchable": {
"fragment_size": 100,
"number_of_fragments": 0
},
"object.parts.manuscriptAllSearchable": {
"fragment_size": 100,
"number_of_fragments": 0
},
"object.parts.genreAllSearchable": {
"fragment_size": 100,
"number_of_fragments": 0
},
"object.parts.popularTitleAllSearchable": {
"fragment_size": 100,
"number_of_fragments": 0
}
}
},
"size": 10,
"from": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment