Ver código fonte

adding documentation on solr setup

master
Jonathan Moss 14 anos atrás
pai
commit
2c96fad147

+ 1
- 0
docs/source/getting_started.rst Ver arquivo

@@ -7,6 +7,7 @@ There are several steps involved to setting up your ecommerce project:
7 7
    :maxdepth: 2
8 8
 
9 9
    getting_started/installation
10
+   getting_started/search
10 11
    getting_started/customising_models
11 12
    getting_started/overriding_core_classes
12 13
    getting_started/create_product_catalogue

+ 1
- 0
docs/source/getting_started/installation.rst Ver arquivo

@@ -54,6 +54,7 @@ Add the following to your `INSTALLED_APPS`::
54 54
     'oscar.image',
55 55
     'oscar.shipping',
56 56
     'oscar.customer',
57
+    'oscar.search',
57 58
     
58 59
 Now fill in the normal settings (not related to django-oscar) within ``settings.py`` - eg ``DATABASES``, ``TIME_ZONE`` etc    
59 60
 

+ 54
- 0
docs/source/getting_started/search.rst Ver arquivo

@@ -0,0 +1,54 @@
1
+.. _solr-debian-installing:
2
+
3
+Search within Oscar
4
+*******************
5
+
6
+Oscar makes use of Solr for searching, faceting and 'more like this' handling.
7
+
8
+This guide details the process of install solr on debian based systems.
9
+
10
+
11
+Installing Solr
12
+===============
13
+
14
+Solr is a java application which needs to run inside a Java servlet container (e.g. Tomcat).
15
+On Debian based system (including Ubuntu) you can install it directly from the apt repository::
16
+
17
+    $ apt-get install solr-tomcat
18
+
19
+.. _solr-debian-configuring:
20
+
21
+Configuring Solr
22
+================
23
+
24
+1. Export the solr schema from the project::
25
+
26
+    $ ./manage.py build_solr_schema > schema.xml
27
+
28
+2. copy ``schema.xml`` over existing solr ``schema.xml``::
29
+
30
+    $ cp schema.xml /etc/solr/conf/schema.xml
31
+
32
+3. Enable the ``More Like This`` request handler::
33
+
34
+    $ vim /etc/solr/conf/solrconfig.xml
35
+
36
+4. Add the following somewhere before the final closing tag::
37
+
38
+    <requestHandler name="/mlt" class="org.apache.solr.handler.MoreLikeThisHandler">
39
+        <lst name="defaults">
40
+        <str name="mlt.interestingTerms">list</str>
41
+        </lst>
42
+    </requestHandler>
43
+
44
+5. Restart tomcat::
45
+
46
+    $ /etc/init.d/tomcat6 restart
47
+
48
+6. Rebuild the complete index::
49
+
50
+    $ ./manage.py rebuild_index
51
+
52
+You can also update the index with::
53
+
54
+    $ ./manage.py update_index

Carregando…
Cancelar
Salvar