Jump to:

10990 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » Sphinx 0.1: $SphinxSearchForm / no enabled local indexes to search

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3 4 5 6 7 8
Go to End
Author Topic: 11638 Views
  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Sphinx 0.1: $SphinxSearchForm / no enabled local indexes to search Link to this post

    For anyone needing simple DataObject and custom field searching see the solution here: http://silverstripe.org/all-other-modules/show/259512?start=24 (make sure to download the file on p4 for 2.4 compatability)

  • Enclave SSC
    Avatar
    Community Member
    31 Posts

    Re: Sphinx 0.1: $SphinxSearchForm / no enabled local indexes to search Link to this post

    Hey Mark

    After quite a bit of SS Sphinx testing I realised Sphinx does not search any attribute value (Integer, Date etc).

    Searching a value such as this results in "query error: no field 'date' found in schema" or "query error: no field 'rating' found in schema".

    Are you aware of this and is this something you set in the module itself?

    Eg. @Title Happy would work as a search. @Date 2009-01-28 would result in the error. Any ideas?

  • mark_s
    Avatar
    Community Member
    78 Posts

    Re: Sphinx 0.1: $SphinxSearchForm / no enabled local indexes to search Link to this post

    Hi. Sorry for delay in getting back.

    Sphinx is somewhat different from a regular search using a database. It differentials text from attributes. Text fields go into the indexes, and this is what the keywords of a search are matched against. Attributes are integer or integer-equivalents that can be used for sorting and filtering, but not for keyword searching. As I understand it, searchd holds an in-memory structure of document IDs and their filters in memory, which is why it can filter so quickly. The word indexes are stored in the file system.

    By default, the sphinx module will automatically identify text fields as the text-searchable fields, and certain other non-text fields as filter tags. You can override this behaviour by setting $search_fields and $filter_fields for the text and attribute fields, respectively.

    Mark

    11638 Views
Page: 1 2 3 4 5 6 7 8
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.