Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

That second colon matters.

  • Loading branch information...
commit 4aeb63ae5645daef9a93f4df617c4f56f55a7d72 1 parent f0e03b3
@toastdriven toastdriven authored
View
2  docs/autocomplete.rst
@@ -86,7 +86,7 @@ To make it work in browser, you need both a view to run the autocomplete
Since it comes up often, here is an example implementation of those things.
-.. warning:
+.. warning::
This code comes with no warranty. Don't ask for support on it. If you
copy-paste it & it burns down your server room, I'm not liable for any
View
18 docs/boost.rst
@@ -30,7 +30,7 @@ the document is being added to the index). Document boost causes the relevance
of the entire result to go up, where field boost causes only searches within
that field to do better.
-.. warning:
+.. warning::
Be warned that boost is very, very sensitive & can hurt overall search
quality if over-zealously applied. Even very small adjustments can affect
@@ -47,7 +47,7 @@ Example::
# Slight increase in relevance for documents that include "banana".
sqs = SearchQuerySet().boost('banana', 1.1)
-
+
# Big decrease in relevance for documents that include "blueberry".
sqs = SearchQuerySet().boost('blueberry', 0.8)
@@ -63,16 +63,16 @@ Document boosting is done by adding a ``boost`` field to the prepared data
from haystack import indexes
from notes.models import Note
-
-
+
+
class NoteSearchIndex(indexes.SearchIndex, indexes.Indexable):
# Your regular fields here then...
-
+
def prepare(self, obj):
data = super(NoteSearchIndex, self).prepare(obj)
data['boost'] = 1.1
return data
-
+
Another approach might be to add a new field called ``boost``. However, this
can skew your schema and is not encouraged.
@@ -86,11 +86,11 @@ An example of this might be increasing the significance of a ``title``::
from haystack import indexes
from notes.models import Note
-
-
+
+
class NoteSearchIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
title = indexes.CharField(model_attr='title', boost=1.125)
-
+
def get_model(self):
return Note
View
2  docs/management_commands.rst
@@ -164,7 +164,7 @@ following arguments::
If provided, determines which connection should be used. Default is
``default``.
-.. warning:
+.. warning::
This command does NOT update the ``schema.xml`` file for you. You either
have to specify a ``filename`` flag or have to
View
2  docs/searchindex_api.rst
@@ -526,7 +526,7 @@ with ``RelatedSearchQuerySet.load_all``. This is useful for post-processing the
results from the query, enabling things like adding ``select_related`` or
filtering certain data.
-.. warning:
+.. warning::
Utilizing this functionality can have negative performance implications.
Please see the section on ``RelatedSearchQuerySet`` within
View
4 docs/signal_processors.rst
@@ -24,7 +24,7 @@ has been introduced. In it's simplest form, the ``SignalProcessor`` listens
to whatever signals are setup & can be configured to then trigger the updates
without having to change any ``SearchIndex`` code.
-.. warning:
+.. warning::
Incorporating Haystack's ``SignalProcessor`` into your setup **will**
increase the overall load (CPU & perhaps I/O depending on configuration).
@@ -74,7 +74,7 @@ Configuration looks like::
This causes **all** ``SearchIndex`` classes to work in a realtime fashion.
-.. note:
+.. note::
These updates happen in-process, which if a request-response cycle is
involved, may cause the user with the browser to sit & wait for indexing to
Please sign in to comment.
Something went wrong with that request. Please try again.