nyeholt / silverstripe-solr

SilverStripe and Solr integration ssaumodule
BSD 3-Clause "New" or "Revised" License
19 stars 18 forks source link

fix(SolrSearch): Changed default search type from 'Page' to 'SiteTree' #49

Closed silbinarywolf closed 8 years ago

silbinarywolf commented 8 years ago

Changed default search type from 'Page' to 'SiteTree' to fix a bug with Mediawesome, as its MediaPage class extends SiteTree, rather than Page. Made the default search type configurable as well.

PLEASE ALSO: Make a 4 or 4.1 branch and do the PR on that too.

NOTE: There are a couple of calls to 'searchableTypes' that pass in 'Page' and may need to be factored in the future to work with this config. I only changed the default 'Page' value for functions that were within the 'getQuery' code path as that is all that's been tested.