Skip to content

Commit 97eeeb0

Browse files
committed
Merge pull request django-haystack#970 from tobych/patch-3
Improve punctuation in super-scary YMMV warning
2 parents 0fe42db + dd2d1e8 commit 97eeeb0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/autocomplete.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ a small window passed over the string). Because this alters the way your
1616
data needs to be stored, the best approach is to add a new field to your
1717
``SearchIndex`` that contains the text you want to autocomplete on.
1818

19-
You have two choices: ``NgramField`` & ``EdgeNgramField``. Though very similar,
19+
You have two choices: ``NgramField`` and ``EdgeNgramField``. Though very similar,
2020
the choice of field is somewhat important.
2121

2222
* If you're working with standard text, ``EdgeNgramField`` tokenizes on
@@ -54,14 +54,14 @@ Step 2. Performing The Query
5454
============================
5555

5656
Haystack ships with a convenience method to perform most autocomplete searches.
57-
You simply provide a field & the query you wish to search on to the
57+
You simply provide a field and the query you wish to search on to the
5858
``SearchQuerySet.autocomplete`` method. Given the previous example, an example
5959
search would look like::
6060

6161
from haystack.query import SearchQuerySet
6262

6363
SearchQuerySet().autocomplete(content_auto='old')
64-
# Result match things like 'goldfish', 'cuckold' & 'older'.
64+
# Result match things like 'goldfish', 'cuckold' and 'older'.
6565

6666
The results from the ``SearchQuerySet.autocomplete`` method are full search
6767
results, just like any regular filter.
@@ -82,14 +82,14 @@ Example Implementation
8282

8383
The above is the low-level backend portion of how you implement autocomplete.
8484
To make it work in browser, you need both a view to run the autocomplete
85-
& some Javascript to fetch the results.
85+
and some Javascript to fetch the results.
8686

8787
Since it comes up often, here is an example implementation of those things.
8888

8989
.. warning::
9090

9191
This code comes with no warranty. Don't ask for support on it. If you
92-
copy-paste it & it burns down your server room, I'm not liable for any
92+
copy-paste it and it burns down your server room, I'm not liable for any
9393
of it.
9494

9595
It worked this one time on my machine in a simulated environment.
@@ -133,7 +133,7 @@ The template might look like::
133133
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
134134
<script type="text/javascript">
135135
// In a perfect world, this would be its own library file that got included
136-
// on the page & only the ``$(document).ready(...)`` below would be present.
136+
// on the page and only the ``$(document).ready(...)`` below would be present.
137137
// But this is an example.
138138
var Autocomplete = function(options) {
139139
this.form_selector = options.form_selector

0 commit comments

Comments
 (0)