Skip to content

Commit

Permalink
Refactored documentation to format better in Sphinx.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcroydon authored and toastdriven committed Jan 29, 2009
1 parent 8a00b89 commit 35f257c
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 74 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -2,4 +2,3 @@
.DS_Store
results_soc.py
results_old.py
_build
Empty file added docs/_build/.gitignore
Empty file.
Empty file added docs/_static/.gitignore
Empty file.
Empty file added docs/_templates/.gitignore
Empty file.
70 changes: 33 additions & 37 deletions docs/backend_support.rst
Expand Up @@ -6,16 +6,14 @@ Backend Support
Supported Backends
==================

* Solr_
* Lucene_
* CouchDB_
* Xapian_
* `Hyper Estraier`_
* Sphinx_
* Solr_
* Lucene_
* Xapian_
* `Hyper Estraier`_
* Sphinx_

.. _Solr: http://lucene.apache.org/solr/
.. _Lucene: http://lucene.apache.org/java/
.. _CouchDB: http://couchdb.apache.org/
.. _Xapian: http://xapian.org/
.. _Hyper Estraier: http://hyperestraier.sourceforge.net/
.. _Sphinx: http://www.sphinxsearch.com/
Expand All @@ -27,49 +25,49 @@ Backend Capabilities
Solr
----

* Full SearchQuerySet support
* Automatic query building
* "More Like This" functionality
* Term Boosting
* Faceting
* Stored (non-indexed) fields
* Requires: pysolr
* Full SearchQuerySet support
* Automatic query building
* "More Like This" functionality
* Term Boosting
* Faceting
* Stored (non-indexed) fields
* Requires: pysolr

Lucene
------

* Full SearchQuerySet support
* Automatic query building
* Term Boosting
* Stored (non-indexed) fields
* Requires: pyluncene (owwie?)
* Full SearchQuerySet support
* Automatic query building
* Term Boosting
* Stored (non-indexed) fields
* Requires: pyluncene (owwie?)

Xapian
------

* Full SearchQuerySet support
* Automatic query building
* "More Like This" functionality
* Faceting
* Stored (non-indexed) fields
* Requires: xappy?
* Full SearchQuerySet support
* Automatic query building
* "More Like This" functionality
* Faceting
* Stored (non-indexed) fields
* Requires: xappy?

Hyper Estraier
--------------

* Full SearchQuerySet support
* Automatic query building
* "More Like This" functionality
* Requires: SWIG bindings
* Full SearchQuerySet support
* Automatic query building
* "More Like This" functionality
* Requires: SWIG bindings

Sphinx
------

* Full SearchQuerySet support
* Automatic query building
* Term Boosting
* Stored (non-indexed) fields
* Requires: sphinxapi.py (Comes with Sphinx)
* Full SearchQuerySet support
* Automatic query building
* Term Boosting
* Stored (non-indexed) fields
* Requires: sphinxapi.py (Comes with Sphinx)


+----------------+------------------------+---------------------+----------------+------------+----------+---------------+
Expand All @@ -84,6 +82,4 @@ Sphinx
| Hyper Estraier | Yes | Yes | Yes | No | No | No |
+----------------+------------------------+---------------------+----------------+------------+----------+---------------+
| Sphinx | Yes | Yes | No | Yes | No | Yes |
+================+========================+=====================+================+============+==========+===============+


+----------------+------------------------+---------------------+----------------+------------+----------+---------------+
28 changes: 15 additions & 13 deletions docs/creating_new_backends.rst
Expand Up @@ -4,10 +4,11 @@ Creating New Backends

The process should be fairly simple.

# Create new backend file. Name is important.
# Two classes inside.
# SearchBackend
# SearchQuery
#. Create new backend file. Name is important.
#. Two classes inside.

#. SearchBackend
#. SearchQuery


SearchBackend
Expand All @@ -16,12 +17,13 @@ SearchBackend
Responsible for the actual connection and low-level details of interacting with
the backend.

* Connects to search engine
* Method for saving new docs to index
* Method for removing docs from index
* Method for performing the actual query
* Returns SearchResult objects
* Must populate a hit count if provided by backend
* Connects to search engine
* Method for saving new docs to index
* Method for removing docs from index
* Method for performing the actual query

* Returns SearchResult objects
* Must populate a hit count if provided by backend


SearchQuery
Expand All @@ -30,6 +32,6 @@ SearchQuery
Responsible for taking structured data about the query and converting it into a
backend appropriate format.

* Method for creating the backend specific query - build_query
* Method for returning hits - get_count
* Method for sanitizing user queries - clean
* Method for creating the backend specific query - build_query
* Method for returning hits - get_count
* Method for sanitizing user queries - clean
34 changes: 11 additions & 23 deletions docs/division_of_labor.rst
Expand Up @@ -6,34 +6,22 @@ SearchQuerySet

One main implementation.

* Standard API that loosely follows QuerySet
* Handles most queries
* Allows for custom "parsing"/building through API
* Dispatches to backend for actual query
* Handles automatically creating a query

* Standard API that loosely follows QuerySet
* Handles most queries
* Allows for custom "parsing"/building through API
* Dispatches to backend for actual query
* Handles automatically creating a query


SearchBackend
-------------

Implemented per-backend.

* Connects to search engine
* Method for saving new docs to index
* Method for removing docs from index
* Method for performing the actual query
* What does this return? SearchResult objects? A list of dicts?
* What about the total count?
* Connects to search engine
* Method for saving new docs to index
* Method for removing docs from index
* Method for performing the actual query


Questions
---------

* Should there be a SearchQuery object, implemented on a per-backend basis,
that handles generating the actual query? Or should the SearchBackend
simply provide a build_query method that accepts the all the details from
SearchQuerySet and constructs the query?
* How will automagic queries work? Backend-specific or use the
SearchQuerySet API to just build it and let it process through the backend
the same way as manual queries?
* What does this return? SearchResult objects? A list of dicts?
* What about the total count?

0 comments on commit 35f257c

Please sign in to comment.