Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

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

Sphinx 0.1: $SphinxSearchForm / no enabled local indexes to search


Reply


59 Posts   11958 Views

Avatar
Carbon Crayon

Community Member, 598 Posts

8 August 2010 at 3:17am

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)

Avatar
Enclave SSC

Community Member, 31 Posts

21 August 2010 at 12:16am

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?

Avatar
mark_s

Community Member, 78 Posts

26 August 2010 at 4:15pm

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