Commit Graph

63 Commits

Author SHA1 Message Date
Robbie Averill b448bfcd20 NEW Add config for shutdown flush, remove references to Object and update tests 2017-11-14 17:05:30 +13:00
Robbie Averill 0de6f52b1f Merge remote-tracking branch 'upstream/master' into compat4/btasker 2017-11-14 16:31:16 +13:00
Mojmir Fendek 16fc54e101
Index now supports multiple relations with the same name. 2017-06-21 13:13:33 +01:00
Ingo Schommer b7f4c1e5f8
Test for ambiguous relationships
See https://github.com/silverstripe/silverstripe-fulltextsearch/pull/145
2017-06-21 13:09:31 +01:00
Brett Tasker 8adb3171f0 FIX: Update travis to remove php 5.5 + Fix SearchVariantSubsiteTest reference to SapphireTest 2017-05-01 20:46:19 +12:00
Brett Tasker 4c44d1c29e FIX: Broken merge as files have been moved + Fixed additional tests 2017-05-01 20:18:59 +12:00
Brett Tasker c29e8ec6bf Merge branch 'master' into compat4/btasker 2017-04-27 00:27:16 +12:00
Brett Tasker a8588b2fd8 Merge branch 'compat/4' into compat4/btasker 2017-04-27 00:24:46 +12:00
Brett Tasker 73e4888715 SS 4.0 - Upgrade tests to SilverStripe 4.0 & Replace Phockito 2017-04-26 22:53:00 +12:00
Marco Hermo e422ad48c9 Use PHP5.5 class name resolution operator 2017-04-25 21:11:29 +12:00
Marco Hermo 8228c762c9 Explicit namespace definition on YAML files 2017-04-24 09:05:47 +12:00
Brett Tasker 168b6745b4 SS 4.0 - Skip Subsite tests if module is not installed 2017-04-22 21:36:40 +12:00
Brett Tasker 43dd2ba398 SS 4.0 - Replace inst()->update with modify()->set and hasOne with hasOneComponent 2017-04-22 21:31:34 +12:00
Brett Tasker 0b7281b25e SS 4.0 - Update references to thirdparty Solr API as its not namespaced 2017-04-22 21:30:02 +12:00
Brett Tasker 6066af5841 Update Search Manipulater 2017-04-21 16:34:04 +12:00
Brett Tasker 9d5ea9393d Batch fixes for tests #2 2017-04-21 14:14:30 +12:00
Brett Tasker 6a2a4a8dd2 Update namespacing for Search indexes and variants in tests 2017-04-21 13:32:39 +12:00
Brett Tasker 0ee34e49e2 Fix PHP errors in test 2017-04-21 13:26:07 +12:00
Brett Tasker 0ebf6e6220 Second push of Test changes + namespacing 2017-04-21 13:18:37 +12:00
Brett Tasker ddbab95e3f Namespacing for tests 2017-04-21 12:23:27 +12:00
Elliot Sawyer 2246fa9ab8 Obtain search results for a particular subsite when the request comes from a query (#136)
* Allow a user to obtain search results for a particular subsite when the request comes from a query

When attempting to do this in project code, SearchVariantSubsites kicks in and replaces any filter you've applied with the current subsite ID, which prevents you from searching for filtered results in another subsite.

This fix prevents the module from doing this if a filter is applied on the query

TODO  write unit tests for the filter() and exclude() behaviours
2017-03-30 11:17:46 +01:00
Daniel Hensby 9e5d432aa5
Merge branch 'pull/138' into 2.3 2017-03-09 10:47:21 +00:00
Damian Mooyman bbaf4276af
BUG Fix delete / unpublish
Split SearchUpdater classes into separate files
Fixes #134
2017-03-09 12:34:20 +13:00
Daniel Hensby 50c9f52d58
Test coverage for SearchVariantSubsites@extractManipulationWriteState 2016-12-09 12:02:10 +00:00
UndefinedOffset 6ff50fede9 BUGFIX: SolrVersionedTest_Index causing crash in unit tests when Phockito is not installed 2016-06-16 11:50:21 -03:00
Damian Mooyman e5fbdf9d42 BUG fix issues with search variants applying to more than one class 2016-04-26 12:43:31 +12:00
Damian Mooyman ec5e4f4581 BUG Fix versioned writes where subtables have no fields key
BUG Remove unnecessary config nesting in tests which are now handled via core
Fixes some regressions in recent framework fixes to versioned
2016-04-15 15:46:19 +12:00
helpfulrobot f87690ef22 Converted to PSR-2 2015-12-18 07:16:09 +13:00
madmatt 665490dfde MINOR: Don't include Hamcrest globally so it doesn't conflict with PHPUnit
PHPUnit now includes matching functions like `any()` and `anything()` outside of a namespace, which conflicts with `Phockito` that does the same thing when calling `Phockito::include_hamcrest(true)`.

This test in particular breaks Behat, because the file includes a class (`SolrReindexTest_Item`) that extends `DataObject`, meaning that this file gets included very early in the initialisation process.

Instead, we can just set `Phockito::include_hamcrest(false)` and use the full path to the Hamcrest matching functions instead (e.g. `\Hamcrest_Matchers::anything()`).
2015-11-27 12:43:33 +13:00
helpfulrobot 314feddd48 Converted to PSR-2 2015-11-21 19:19:20 +13:00
Damian Mooyman 1683f776bd API QueuedJob support for Solr_Reindex
API Incremental clear and re-index of records rather than clearing all records from SolrIndex up front
2015-07-28 12:46:23 +12:00
Damian Mooyman ae2828ed70 BUG Prevent subsites breaking solrindexversionedtest 2015-06-30 17:36:46 +12:00
Damian Mooyman f2f16ae863 API Enable boosted fields to be specified on the index
API Enable configuration of default field
2015-06-30 15:13:49 +12:00
Damian Mooyman 1608d8384d Merge pull request #63 from chillu/pulls/fix-highlight-support
Fix highlight support when querying by fields (or boosting fields)
2015-06-03 10:11:31 +12:00
Damian Mooyman 16a6f362e2 API Only allow one scheduled commit job at a time 2015-05-11 16:35:43 +12:00
Damian Mooyman 60b05db1ce API Separate searchupdate / commit into separate queued-jobs
API Enable indexes to deprecate other classes
API Enable indexes to be globally specified in config
2015-05-08 15:22:46 +12:00
Ingo Schommer 50f53e7bac Fix highlight support when querying by fields (or boosting fields)
Highlighting will simply be empty otherwise, presumably
because it can't match against the complex query term in the "q" parameter.
2015-05-05 19:44:07 +12:00
Damian Mooyman 620d7861b6 BUG Add missing addStoredFields method 2015-02-17 10:17:58 +13:00
☃ Stephen Shkardoon ☃ cb1770864d Merge pull request #49 from tractorcow/pulls/solr-4-compat
BUG Fix Solr 4.0 compatibility issue
2014-11-17 16:50:12 +13:00
Sean Harvey 2ba90f4239 Merge pull request #50 from tractorcow/pulls/phockito-failover
BUG Fix test case not elegantly failing on missing phockito
2014-08-21 17:22:23 +12:00
Sean Harvey e22d6053e5 Adding tests for SearchIndex::fieldData() 2014-08-21 16:58:59 +12:00
Damian Mooyman 9efe4baa16 API SearchUpdateQueuedJobProcessor now uses batching 2014-08-21 16:19:51 +12:00
Damian Mooyman 790afb211a BUG Fix test case not elegantly failing on missing phockito 2014-06-18 11:04:18 +12:00
Damian Mooyman 892562c2ba BUG Fix Solr 4.0 compatibility issue 2014-06-17 17:56:46 +12:00
Damian Mooyman 23a1ba6e1a BUG Fix subsite document ID generation 2014-05-22 16:48:37 +12:00
Darren Inwood a2cfbb531b BUG Fix sold indexing storing against the incorrect class key 2014-05-22 12:18:38 +12:00
Sam Minnee 4b51393e01 Don't rely on MySQL ordering of index->getAdded()
MySQL is more reliable in its output ordering of elements where the order doesn't matter.
PostgreSQL is not.  This meant that this test "accidentally passed" on MySQL and failed on
PostgreSQL.  The sort function resolves this.
2014-02-14 11:32:24 +13:00
Hamish Friedlander 3d18903552 API Add support for Solr 4 and make it the default
Solr::configure_server now takes "version" as one of the keys in the
option array, and behaves slightly differently depending on whether
that version is 3 or 4, to provide support for both Solr versions.

The Solr extras and templates have also moved, so that different
versions can be provided for the two different Solr versions.
2013-11-08 15:03:47 +13:00
Hamish Friedlander 03a206109a Make tests run 2013-09-11 14:35:01 +12:00
Hamish Friedlander dbd68dc300 API Move SearchUpdate queue handling to DIed processor, add QueuedJob support 2013-07-25 14:28:10 +12:00