Comments (7)
That's a problem I was speaking about with @wernerkrauss on the IRC channel. The problem is that it isn't possible to hook the dev/build since SS v. 3.1.17, and I'm actually building my keys using a workaround.
I can maybe create a new branch that drop support for older installations, and go ahead with the new version...
What do you think about that?
from silverstripe-searchable-dataobjects.
Hi @g4b0
I am using SS v3.1.15 which I believe is the most up to date stable release at the current time. Do you mean that your module has already been updated to work with a newer version of SS which is still in beta and because of that you have started to use this work around?
I don't really fully understand what the issue is, or what causes it to occur (I understand the error message itself, but not why the code attempts to create multiple indexes which seem to be identical) it seems to happen to me after some random period of time when doing a /dev/build (or perhaps after a fixed number of /dev/builds based on my DB contents?).
I presume simply removing the augmentDatabase() method all together would mean that the /dev/tasks/PopulateSearch task would need running any time I wanted newly added data objects to be added to the SearchableDataObjects table in the DB? Not really too sure when the augmentDatabase() method is called?
Kind regards,
HARVS1789UK
from silverstripe-searchable-dataobjects.
@g4b0 wasn't there another solution discussed by hooking in init() on dev/build contoller?
@HARVS1789UK version 3.1.17 is surely a typo, but he was referencing to a quite new method that won't work in older installs yet.
from silverstripe-searchable-dataobjects.
@wernerkrauss yep, I have to further investigate about it...
@HARVS1789UK yes, it was a typo, I don't have access to future SS release :)
from silverstripe-searchable-dataobjects.
I've came up with this same issue and I found a way to solve it. Change the line 62 on searchable-dataobjects/code/SearchableDataObject.php:
DB::query("ALTER TABLE SearchableDataObjects ADD FULLTEXT (Title
,Content
)");
to:
$count = DB::query("SELECT COUNT(1) FROM INFORMATION_SCHEMA.STATISTICS WHERE table_schema=DATABASE() AND table_name='SearchableDataObjects' AND index_name='Title'")->value();
if($count == 0){
DB::query("ALTER TABLE SearchableDataObjects ADD FULLTEXT Title (`Title` ,`Content`)");
}
The problem was that the Index were created over an over everytime we executed dev/build until it ran out of limit.
from silverstripe-searchable-dataobjects.
Nice workaround @diegopego86, it could be useful for maintaining compatibility with old installations.
from silverstripe-searchable-dataobjects.
included in version 2.1.3
Thanks a lot @diegopego86
In a future 3.* version I will hook into dev/build loosing compatibility with older SS version
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
- readme.md example DataObject class code bug HOT 4
- 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.