Beispiel #1
0
# same for similarity search
app.set_sim_client(sim_cl)

# if cl has a search cache preload it
app.set_preload_cache_file('data/redis-cache.dat')

# some more options which can be set
app.set_debug(True)  # also web.config.debug
app.set_template_caching(False)  # also web.config.template_caching
app.set_flush_cache_on_startup(True)

# what sorting options are shown (key must match cl sort options)
app.set_ui_sort_by(
    dict(key='cit', description='number of citations'),
    dict(key='rel', description='relevance'),
    dict(key='dat', description='year')
)

# you can reorder the facets and change default look here
# name must match the sphinx client facet names
app.set_ui_facets(
    dict(name='author', description='AUTHORS', color='blue', visualization='counts'),
    dict(name='keyword', description='KEYWORDS', color='black'),
    dict(name='venue', description='VENUE', color='green', visualization='counts'),
    dict(name='year', description='YEAR', color='red', visualization='rose'),
)

# instance name and description which appears in the front page
app.set_ui_instance(
    instance_name='DBLP', 
Beispiel #2
0
app.set_fsphinx_client(cl)

# same for similarity search
app.set_sim_client(sim_cl)

# if cl has a search cache preload it
app.set_preload_cache_file('data/redis-cache.dat')

# some more options which can be set
app.set_debug(True)  # also web.config.debug
app.set_template_caching(False)  # also web.config.template_caching
app.set_flush_cache_on_startup(True)

# what sorting options are shown (key must match cl sort options)
app.set_ui_sort_by(dict(key='cit', description='number of citations'),
                   dict(key='rel', description='relevance'),
                   dict(key='dat', description='year'))

# you can reorder the facets and change default look here
# name must match the sphinx client facet names
app.set_ui_facets(
    dict(name='author',
         description='AUTHORS',
         color='blue',
         visualization='counts'),
    dict(name='keyword', description='KEYWORDS', color='black'),
    dict(name='venue',
         description='VENUE',
         color='green',
         visualization='counts'),
    dict(name='year', description='YEAR', color='red', visualization='rose'),