djangosnippets.org: Latest snippets tagged with 'haystack'http://djangosnippets.org/tags/haystack/2016-02-04T11:05:28.024100-06:00Haystack whoosh backend with custom analyzer (allow using any lang, word processing, etc)
2016-02-04T11:05:28.024100-06:00sakkadahttp://djangosnippets.org/snippets/10553/<p>It is a haystack custom whoosh backend which provides analyzer customisation (required <code>get_analyzer</code> method definition). That means it is possible to define any complex analyzers (see <a href="https://bitbucket.org/mchaput/whoosh/wiki/Home">whoosh</a> docs and source).</p>
<p>Sample code shows how to use it, builtin <code>LanguageAnalyzer</code> instance configured for working with russian language used as custom analyzer. …</p>
Freely redistributableHaystack whoosh backend for stemming non-english language words
2014-02-09T03:40:45.553939-06:00shamakhovhttp://djangosnippets.org/snippets/3025/<p>It's haystack whoosh backend code which involves stemming for specific language in time of indexing.</p>
<p>2 lines was changed comparing to original whoosh backend (StemmingAnalyzer replaced with LanguageAnalyzer for russian language, list of supported languages: <a href="https://bitbucket.org/mchaput/whoosh/raw/default/src/whoosh/lang/snowball/__init__.py">here</a> )</p>
Freely redistributablehaystack auto update (forget about update_index)
2012-01-17T12:22:01.481895-06:00jpichttp://djangosnippets.org/snippets/2649/<p>Dead simple snippet. Paste it in some models (i use project_specific/models.py), and you don't need to run update_index anymore. When a model is deleted from the database: it is deleted from the index. When a model is saved (created or modified): it is updated in the index.</p>
Freely redistributableHaystack objects in one query
2011-10-13T08:28:10.817269-05:00jasiszhttp://djangosnippets.org/snippets/2571/<p>Actually the best way to handle this is to use built-in http://docs.haystacksearch.org/dev/searchqueryset_api.html#load-all</p>
<p>I just missed it while checking documentation and wrote this crappy snippet!</p>
Freely redistributableFormat Haystack's result with a sprat template
2009-06-23T16:19:39.097976-05:00myleshttp://djangosnippets.org/snippets/1589/Freely redistributable