Code Monkey home page Code Monkey logo

Comments (7)

damianoporta avatar damianoporta commented on May 18, 2024

if we can not use behaviors now, is there any workaround?

from elastic-search.

markstory avatar markstory commented on May 18, 2024

Behaviors are a bit tricky. While we could add them, I have concerns that many core and userland behaviors don't make sense in elastic search. For example TreeBehavior, TranslateBehavior make no sense and really have no way of properly functioning.

from elastic-search.

damianoporta avatar damianoporta commented on May 18, 2024

@markstory you are right, but in this case there are other plugins like file-upload that need before/after save logic. With no behaviors we must create custom listeners somewhere and add callbacks for Model.before/afterSave

I tried to see how behaviorRegistry works, it accepts a Table object on its constructor, if we will implement behaviors...should we modify it or create another one "registry" ?

Thanks!

from elastic-search.

damianoporta avatar damianoporta commented on May 18, 2024

@markstory for example the FriendsOfCake/Search plugin too.

from elastic-search.

lorenzo avatar lorenzo commented on May 18, 2024

I don't think it is a good idea. At least using "behaviors" as a word is not a good idea. We could perhaps duplicate the concept with a different name.

from elastic-search.

github-actions avatar github-actions commented on May 18, 2024

This issue is stale because it has been open for 120 days with no activity. Remove the stale label or comment or this will be closed in 15 days

from elastic-search.

PhantomWatson avatar PhantomWatson commented on May 18, 2024

My current use case that seems to call for a behavior is that I have a SQL table and an Elasticsearch index that represent data with the same fields, and I'd like to have them share custom finder methods. I don't think that this can be accomplished well with traits or class inheritance.

from elastic-search.

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.