Skip to content

Commit 761d4ac

Browse files
committed
Merge pull request django-haystack#660 from seldon/master
Some minor docs fixes
2 parents 042658e + 682bdf7 commit 761d4ac

11 files changed

+20
-20
lines changed

docs/boost.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Despite all being types of boost, they take place at different times and have
2323
slightly different effects on scoring.
2424

2525
Term boost happens at query time (when the search query is run) and is based
26-
around increasing the score is a certain word/phrase is seen.
26+
around increasing the score if a certain word/phrase is seen.
2727

2828
On the other hand, document & field boosts take place at indexing time (when
2929
the document is being added to the index). Document boost causes the relevance

docs/faceting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ What Is Faceting?
88
-----------------
99

1010
Faceting is a way to provide users with feedback about the number of documents
11-
which match terms they may be interested in. At it's simplest, it gives
11+
which match terms they may be interested in. At its simplest, it gives
1212
document counts based on words in the corpus, date ranges, numeric ranges or
1313
even advanced queries.
1414

docs/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Glossary
55
========
66

7-
Search is a domain full of it's own jargon and definitions. As this may be an
7+
Search is a domain full of its own jargon and definitions. As this may be an
88
unfamiliar territory to many developers, what follows are some commonly used
99
terms and what they mean.
1010

docs/inputtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Example::
125125

126126
.. class:: haystack.inputs.AltParser
127127

128-
``AltParser`` let's you specify that a portion of the query should use a
128+
``AltParser`` lets you specify that a portion of the query should use a
129129
separate parser in the search engine. This is search-engine-specific, so it may
130130
decrease the portability of your app.
131131

@@ -153,7 +153,7 @@ The ``prepare`` method lets you alter the query the user provided before it
153153
becomes of the main query. It is lazy, called as late as possible, right before
154154
the final query is built & shipped to the engine.
155155

156-
A full, if somewhat silly, example look like::
156+
A full, if somewhat silly, example looks like::
157157

158158
from haystack.inputs import Clean
159159

docs/installing_search_engines.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Something like the following is suggested::
7474
suggestions = indexes.FacetCharField()
7575

7676
def prepare(self, obj):
77-
prepared_data = super(NoteIndex, self).prepare(obj)
77+
prepared_data = super(MySearchIndex, self).prepare(obj)
7878
prepared_data['suggestions'] = prepared_data['text']
7979
return prepared_data
8080

docs/searchbackend_api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ specific to each one.
5858

5959
.. method:: SearchBackend.search(self, query_string, sort_by=None, start_offset=0, end_offset=None, fields='', highlight=False, facets=None, date_facets=None, query_facets=None, narrow_queries=None, spelling_query=None, limit_to_registered_models=None, result_class=None, **kwargs)
6060

61-
Takes a query to search on and returns dictionary.
61+
Takes a query to search on and returns a dictionary.
6262

6363
The query should be a string that is appropriate syntax for the backend.
6464

docs/searchfield_api.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
.. class:: SearchField
88

9-
The ``SearchField`` and it's subclasses provides a way to declare what data
9+
The ``SearchField`` and its subclasses provides a way to declare what data
1010
you're interested in indexing. They are used with ``SearchIndexes``, much like
1111
``forms.*Field`` are used within forms or ``models.*Field`` within models.
1212

@@ -108,7 +108,7 @@ to be the primary field for searching within. Default is ``False``.
108108

109109
.. attribute:: SearchField.indexed
110110

111-
A boolean flag for indicating whether or not the the data from this field will
111+
A boolean flag for indicating whether or not the data from this field will
112112
be searchable within the index. Default is ``True``.
113113

114114
The companion of this option is ``stored``.
@@ -162,7 +162,7 @@ not to contain any data. Default is ``False``.
162162

163163
Unlike Django's database layer, which injects a ``NULL`` into the database
164164
when a field is marked nullable, ``null=True`` will actually exclude that
165-
field from being included with the document. This more efficient for the
165+
field from being included with the document. This is more efficient for the
166166
search engine to deal with.
167167

168168
``stored``

docs/searchindex_api.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ However, this can also hit the database quite heavily (think
107107
``.get(pk=result.id)`` per object). If your search is popular, this can lead
108108
to a big performance hit. There are two ways to prevent this. The first way is
109109
``SearchQuerySet.load_all``, which tries to group all similar objects and pull
110-
them though one query instead of many. This still hits the DB and incurs a
110+
them through one query instead of many. This still hits the DB and incurs a
111111
performance penalty.
112112

113113
The other option is to leverage stored fields. By default, all fields in
@@ -159,7 +159,7 @@ see, the churn rate of your data and what concerns are important to you
159159
The conventional method is to use ``SearchIndex`` in combination with cron
160160
jobs. Running a ``./manage.py update_index`` every couple hours will keep your
161161
data in sync within that timeframe and will handle the updates in a very
162-
efficient batch. Additionally, Whoosh (and to a lesser extent Xapian) behave
162+
efficient batch. Additionally, Whoosh (and to a lesser extent Xapian) behaves
163163
better when using this approach.
164164

165165
Another option is to use ``RealtimeSignalProcessor``, which uses Django's
@@ -236,7 +236,7 @@ you might write the following code::
236236
return "%s <%s>" % (obj.user.get_full_name(), obj.user.email)
237237

238238
This method should return a single value (or list/tuple/dict) to populate that
239-
fields data upon indexing. Note that this method takes priority over whatever
239+
field's data upon indexing. Note that this method takes priority over whatever
240240
data may come from the field itself.
241241

242242
Just like ``Form.clean_FOO``, the field's ``prepare`` runs before the

docs/searchquery_api.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
The ``SearchQuery`` class acts as an intermediary between ``SearchQuerySet``'s
1010
abstraction and ``SearchBackend``'s actual search. Given the metadata provided
11-
by ``SearchQuerySet``, ``SearchQuery`` build the actual query and interacts
11+
by ``SearchQuerySet``, ``SearchQuery`` builds the actual query and interacts
1212
with the ``SearchBackend`` on ``SearchQuerySet``'s behalf.
1313

1414
This class must be at least partially implemented on a per-backend basis, as portions
@@ -236,8 +236,8 @@ Adds a boosted term and the amount to boost it to the query.
236236

237237
Runs a raw query (no parsing) against the backend.
238238

239-
This method causes the SearchQuery to ignore the standard query
240-
generating facilities, running only what was provided instead.
239+
This method causes the ``SearchQuery`` to ignore the standard query-generating
240+
facilities, running only what was provided instead.
241241

242242
Note that any kwargs passed along will override anything provided
243243
to the rest of the ``SearchQuerySet``.

docs/searchqueryset_api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ amount of time between gaps as ``gap_by`` (one of ``'year'``, ``'month'``,
311311

312312
You can also optionally provide a ``gap_amount`` to specify a different
313313
increment than ``1``. For example, specifying gaps by week (every seven days)
314-
would would be ``gap_by='day', gap_amount=7``).
314+
would be ``gap_by='day', gap_amount=7``).
315315

316316
In the search results you get back, facet counts will be populated in the
317317
``SearchResult`` object. You can access them via the ``facet_counts`` method.
@@ -544,7 +544,7 @@ for similar results. The instance you pass in should be an indexed object.
544544
Previously called methods will have an effect on the provided results.
545545

546546
It will evaluate its own backend-specific query and populate the
547-
`SearchQuerySet`` in the same manner as other methods.
547+
``SearchQuerySet`` in the same manner as other methods.
548548

549549
Example::
550550

docs/utils.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Included here are some of the general use bits included with Haystack.
1212

1313
.. function:: get_identifier(obj_or_string)
1414

15-
Get an unique identifier for the object or a string representing the
15+
Gets an unique identifier for the object or a string representing the
1616
object.
1717

18-
If not overridden, uses <app_label>.<object_name>.<pk>.
18+
If not overridden, uses ``<app_label>.<object_name>.<pk>``.

0 commit comments

Comments
 (0)