PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/kai/templates/docs/load_content.mako

Relevant Search: With Applications for Solr and Elasticsearch

For more in depth reading about search, ranking and generally everything you could ever want to know about how lucene, elasticsearch or solr work under the hood I highly suggest this book. Easily one of the most interesting technical books I have read in a long time. If you are tasked with solving search relevance problems even if not in Solr or Elasticsearch it should be your first reference. Amazon Affiliate Link
https://bitbucket.org/bbangert/kai/
Mako | 30 lines | 28 code | 2 blank | 0 comment | 4 complexity | 5050dc3d1188e8980ecff836452bbe62 MD5 | raw file
 1<%
 2file_content = None
 3try:
 4    try:
 5        file_content = open(c.url)
 6        doc_content = file_content.read()
 7    except:
 8        h.redirect_to('/')
 9finally:
10    if file_content:
11        file_content.close()
12
13try:
14    doc_content = doc_content.decode('utf-8')
15except:
16    doc_content = doc_content.decode('utf-8', 'ignore')
17%>
18<div class="yui-b sphinx content">
19% if c.version < g.current_version:
20<div class="admonition warning">
21<p class="first admonition-title">Warning</p>
22<p class="last">This documentation does not refer to the most recent version of Pylons. <a href="http://wiki.pylonshq.com/display/pylonsdocs/Home">Current Documentation</a></p>
23</div>
24% endif
25
26${doc_content | n}
27</div>
28<%def name="title()">${parent.title()} - Docs</%def>
29<%def name="nav()">Docs</%def>
30<%inherit file="/layout.mako"/>