Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

search.rst 1.3KB

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