Skip to content

Instantly share code, notes, and snippets.

@saml
Last active December 20, 2015 02:19
Show Gist options
  • Select an option

  • Save saml/6055450 to your computer and use it in GitHub Desktop.

Select an option

Save saml/6055450 to your computer and use it in GitHub Desktop.
solr nginx conf
location /homepage-latest-articles/ {
proxy_cache default;
proxy_cache_valid 200 10m;
if ($request_method !~ ^GET$) {
return 405;
}
if ($args !~ ^json\.wrf=([^=&]+)$) {
return 400 "need json.wrf= param for callback.\n";
}
rewrite ^ /solr/mycore/select/?q=*:*&wt=json&sort=publishDate%20desc&group=true&group.query=blogName:VanityFair&group.query=blogName:NewYorker&group.query=blogName:CondeNast&group.limit=20&fl=canonicalUrl,featureRubric,entryTitle,publishDate,excerpt,primaryImage&echoHandler=false&echoParams=none&$args? break;
proxy_pass http://solr:8080;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment