Skip to content

Instantly share code, notes, and snippets.

@confact
Created March 11, 2015 20:51
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 confact/6ac9ccc9f34e317e352f to your computer and use it in GitHub Desktop.
Save confact/6ac9ccc9f34e317e352f to your computer and use it in GitHub Desktop.
Elasticsearch codeigniter advancedquery example
$esquery = '{
"fields" : ["name", "bitrate", "genres","urlid","country", "country_name"],
"query":
{
"query_string": {
"query":"'.$query.'"
}
}
}';
echo json_encode(($this->elasticsearch->advancedquery("station",$esquery)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment