Giter Site home page Giter Site logo

Comments (7)

g4b0 avatar g4b0 commented on July 19, 2024

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.

HARVS1789UK avatar HARVS1789UK commented on July 19, 2024

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.

wernerkrauss avatar wernerkrauss commented on July 19, 2024

@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.

g4b0 avatar g4b0 commented on July 19, 2024

@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.

dnpg avatar dnpg commented on July 19, 2024

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.

g4b0 avatar g4b0 commented on July 19, 2024

Nice workaround @diegopego86, it could be useful for maintaining compatibility with old installations.

from silverstripe-searchable-dataobjects.

g4b0 avatar g4b0 commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.