Commit Graph

38 Commits

Author SHA1 Message Date
Steve Boyd
302af21cad ENH PHP 8.1 compatibility 2022-04-13 11:24:03 +12:00
Steve Boyd
752803148d API phpunit 9 support 2021-11-02 14:48:12 +13:00
Steve Boyd
cfe937fbd1 NEW canView() check on record before indexing and before showing in search results 2020-06-10 17:22:20 +12:00
Steve Boyd
bfa2edee6a Improved search filtering based on visibility 2020-04-09 09:04:01 +12:00
Andrew Aitken-Fincham
e2a68ccffe improve SearchQuery API readability by deprecating functions
deprecate filter, exclude, fuzzysearch, inClass

deprecate start, limit

deprecate page, update SearchQuery_Range

add _config.php with Deprecation versioning

update index.md method names

update solr.md method names
2018-05-18 10:15:20 +01:00
jovenden
c110eac8a1 Remove unneeded test as getClassNameFromIndex has been removed 2018-03-09 13:26:55 +13:00
jovenden
0fbff7ca6a Remove all further references to getClassNameFromIndex() 2018-03-09 09:42:33 +13:00
Robbie Averill
31991858ef FIX Update tests to reflect the fact that the versioned variant is not relevant for SearchUpdaterTest_Container 2018-02-23 16:42:35 +13:00
Robbie Averill
4d57f09230 NEW Replace backslashes in Solr index names with dashes 2017-12-06 10:17:24 +13:00
Robbie Averill
861f87514d API Update Subsite integration, remove Polyhome variant
Add a method to clear cached variants from SearchVariant, and a configuration flag for whether
a variant should be enabled or not. Add a FullTextSearch TestState class which will globally
disable the queuedjobs and fulltextsearch shutdown handlers during tests, and is not used to
clear cached variants on each test to prevent global state leakage.

Also removes Phockito as a test dependency.
2017-12-05 14:29:53 +13:00
Robbie Averill
6811082263 NEW Support environment variables for Solr index prefix and suffix 2017-11-30 10:40:25 +13:00
Robbie Averill
fbc4c0e81d FIX Escape backslashes in class namespaces when performing queries, tidy up SearchVariantVersioned a bit 2017-11-16 13:59:15 +13:00
Robbie Averill
e590132967 FIX Run phpcbf automated linting to fix PSR-2 code styles, add PSR-4 autoloader 2017-11-15 09:53:33 +13:00
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
73e4888715 SS 4.0 - Upgrade tests to SilverStripe 4.0 & Replace Phockito 2017-04-26 22:53:00 +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
6066af5841 Update Search Manipulater 2017-04-21 16:34:04 +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
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
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
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
Sean Harvey
e22d6053e5 Adding tests for SearchIndex::fieldData() 2014-08-21 16:58:59 +12: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
d6cf16c391 FIX Phockito-based tests to pass 2013-07-25 13:27:15 +12:00
Ingo Schommer
874bd32300 ENHANCEMENT Solr->addCopyFields() 2012-10-05 15:16:15 +02:00
Ingo Schommer
0ef78f905c ENHANCEMENT Per-field analyser support for SolrIndex 2012-10-05 12:40:46 +02:00
Ingo Schommer
b6fd7b7b89 ENHANCEMENT Extra field definition options for SolrIndex 2012-10-05 12:40:43 +02:00
Ingo Schommer
2c7d6d0ab8 BUG Only index date fields with values
Otherwise the values end up being the start of epoch (1970-01-01)
by default, which can throw off search filters. See README additions for details.
2012-08-29 21:00:40 +02:00
Ingo Schommer
989cc36766 NEW Added search-time boost support to SolrIndex 2012-08-23 18:30:46 +02:00