Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Country of the user is added to loan stats in solr.

  • Loading branch information...
commit c5c450f0bb6c3d082100bc9596b67e64737358eb 1 parent 497d7a9
@anandology anandology authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 openlibrary/solr/
4 openlibrary/solr/
@@ -17,7 +17,6 @@
import simplejson
import logging
import os
-import time
from infogami import config
from openlibrary.solr.solrwriter import SolrWriter
@@ -184,6 +183,9 @@ def add_subjects(type):
if year:
solrdoc['publish_year'] = year
+ if "geoip_country" in doc:
+ solrdoc['country_s'] = doc['geoip_country']
# Remove None values
solrdoc = dict((k, v) for k, v in solrdoc.items() if v is not None)
return solrdoc
Please sign in to comment.
Something went wrong with that request. Please try again.