def oral_argument_sitemap_maker(request): return make_solr_sitemap( request, settings.SOLR_AUDIO_URL, make_sitemap_solr_params('dateArgued asc', 'oa_sitemap'), 'monthly', ['mp3'], 'absolute_url', )
def people_sitemap_maker(request): return make_solr_sitemap( request, settings.SOLR_PEOPLE_URL, make_sitemap_solr_params("dob asc,name_reverse asc", "p_sitemap"), "monthly", [], "absolute_url", )
def opinion_sitemap_maker(request): return make_solr_sitemap( request, settings.SOLR_OPINION_URL, make_sitemap_solr_params('dateFiled asc', 'o_sitemap'), 'monthly', ['pdf', 'doc', 'wpd'], 'absolute_url', )
def people_sitemap_maker(request): return make_solr_sitemap( request, settings.SOLR_PEOPLE_URL, make_sitemap_solr_params('dob asc,name_reverse asc', 'p_sitemap'), 'monthly', [], 'absolute_url', )
def recap_sitemap_maker(request): return make_solr_sitemap( request, settings.SOLR_RECAP_URL, make_sitemap_solr_params('docket_id asc', 'r_sitemap'), 'weekly', [], 'docket_absolute_url', )
def opinion_sitemap_maker(request): return make_solr_sitemap( request, settings.SOLR_OPINION_URL, make_sitemap_solr_params("dateFiled asc", "o_sitemap"), "monthly", ["pdf", "doc", "wpd"], "absolute_url", )
def recap_sitemap_maker(request): return make_solr_sitemap( request, settings.SOLR_RECAP_URL, make_sitemap_solr_params("docket_id asc", "r_sitemap"), "weekly", [], "docket_absolute_url", )
def oral_argument_sitemap_maker(request): return make_solr_sitemap( request, settings.SOLR_AUDIO_URL, make_sitemap_solr_params("dateArgued asc", "oa_sitemap"), "monthly", ["mp3"], "absolute_url", )
def get_expected_item_count(self): # OpinionsSitemap uses the solr index to generate the page, so the only # accurate count comes from the index itself which will also be based on # the fixtures. conn = sunburnt.SolrInterface(settings.SOLR_OPINION_URL, mode='r') params = make_sitemap_solr_params('dateFiled asc', 'o_sitemap') params['rows'] = 1000 r = conn.raw_query(**params).execute() # the underlying SitemapTest relies on counting url elements in the xml # response...this logic mimics the creation of the xml, so we at least # know what we *should* get getting for a count if the SiteMapTest's # HTTP client-based test gets an HTTP 200 count = 0 for result in r: if result.get('local_path'): count += 2 else: count += 1 return count
def get_expected_item_count(self): # OpinionsSitemap uses the solr index to generate the page, so the only # accurate count comes from the index itself which will also be based # on the fixtures. conn = ExtraSolrInterface(settings.SOLR_OPINION_URL) params = make_sitemap_solr_params("dateFiled asc", "o_sitemap") params["rows"] = items_per_sitemap params["fq"] = ["court_exact:%s" % self.court_id] r = conn.query().add_extra(**params).execute() # the underlying SitemapTest relies on counting url elements in the xml # response...this logic mimics the creation of the xml, so we at least # know what we *should* get getting for a count if the SiteMapTest's # HTTP client-based test gets an HTTP 200 count = 0 for result in r: if result.get("local_path"): count += 2 else: count += 1 return count