Skip to content

Instantly share code, notes, and snippets.

@arey
Last active December 28, 2015 03:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Search query that could be used for completion suggestions on the MusicBrainz Elasticsearch index created by the batch provided in the https://github.com/arey/musicbrainz-elasticsearch repository.
curl -XPOST 'http://es.javaetmoi.com/musicalbum/album/_search?pretty' -d '
{
"fields": [
"artist.name",
"id",
"name",
"year.string"
],
"query": {
"query_string": {
"fields": [
"name",
"name.start",
"year.string",
"artist.name",
"artist.name.start"
],
"query": "U2",
"use_dis_max": false,
"auto_generate_phrase_queries": true,
"default_operator": "OR"
}
},
"highlight": {
"number_of_fragments": 0,
"pre_tags": [
"<b>"
],
"post_tags": [
"</b>"
],
"fields": {
"artist.name": {},
"name": {},
"year.string": {}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment