Installation

  1. Create your search engine project in django:

    django-admin startproject example
    
  2. Install magellan via your favorite package installer:

    pip install git+https://github.com/georgedorn/django-magellan.git
    
  3. Add ‘magellan’ to your INSTALLED_APPS. If you are not overriding the search_results.html template, also add ‘pagination’ to INSTALLED_APPS and ‘pagination.middleware.PaginationMiddleware’ to MIDDLEWARE_CLASSES.

  4. In settings.py, configure:

    MAGELLAN_PLUGINS_MODULE_PATH = "example.plugins"
    - Optional, if you want to provide site-specific content extractors.
    MAGELLAN_WHOOSH_INDEX = os.path.join(my_path, 'whoosh_site_index')
    - Where to store the Whoosh files.
    MAGELLAN_WHOOSH_MAX_MEMORY = 256
    - Maximum memory (in MB) to use for Whoosh.  Bigger is faster..
    SPIDER_COOKIE_JAR = os.path.join(my_path, 'cookies')
    - Where to store auth cookies when spidering.
    
  5. Configure your database and install the models:

    python manage.py syncdb
    
  6. Run your django server (manage.py runserver or however you deploy this)

  7. In django’s admin, configure one or more SearchProfile objects.

  8. Invoke the spider:

    python manage.py index
    python manage.py index MyProfile #to only index one profile
    
  9. Magellan provides an optional view and template. Hook up the magellan search result view in your urls.py. (This will become an include eventually.):

    url(r'^search/', 'magellan.views.search'),
    

Project Versions

Previous topic

Welcome to Django-Magellan’s documentation!

Next topic

Custom Content Extraction Plugins

This Page