Comments (4)
@muskie9 what do you think about that? It seems reasonable, isn't it?
from silverstripe-searchable-dataobjects.
I think that's fine for the example code. I would suggest though that if you aren't going to be running anything in the closure other than return true;
to not include getSearchFilterByCallback()
on the object as it may have unintended results since it's a hard true
.
from silverstripe-searchable-dataobjects.
Hi @muskie9
Agreed, now that I have read through the code and seeing a check is made to see if the method exists I could just as easily remove the getSearchFilterByCallback()
method from my DataObject (which I will probably do).
Just thought I would raise the potential time saver in the example code in README.md as I expect that many users of the module will (like me) be lazy and copy the example code to get the module up and running ASAP and many of them may also spend some time wondering why their DO's are still not showing up in search. Up to you guys if you want to make the change or not, just thought id suggest it.
Kind regards,
HARVS1789UK
from silverstripe-searchable-dataobjects.
I think it's a good suggestion, probably a good idea to describe filterByCallback()
usage a bit as well. I started looking around the SilverStripe docs but there's nothing in there that I could find for that filter type. Only a single example in the API.
from silverstripe-searchable-dataobjects.
Related Issues (20)
- SearchableDataObject does take into account SiteTree versioned HOT 2
- PopulateSearch::insert() containts echo statements HOT 1
- SQL is invalid // there is an surplus "e" in the query HOT 1
- SearchableDataObject onBeforeDelete override calls parent::onAfterDelete() HOT 1
- Provide own search controller HOT 2
- mysql error on a fresh install HOT 3
- Make search form configurable HOT 1
- SearchableDataObject DB table has multiple keys/indexes HOT 7
- Possibility to filter by language or Subsite? HOT 3
- Return 1 Page when Multiple DataObject ComeBack HOT 4
- Possibility to search substrings / use wildcard
- SS 3.3.1: tons of "Title" indexes HOT 9
- Module does not work on sqlite - tests with sqlite not working HOT 2
- SearchForm results() function exposed as controller action HOT 2
- nonexistent SearchableDataObject in 'extensions' getting error HOT 1
- SS 4.5 populate search issue
- Error : Class 'HTMLPurifier_Config' not found HOT 1
- Support for SIlverstripe 5 HOT 2
- Deprecation warning after PHP7.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from silverstripe-searchable-dataobjects.