GithubHelp home page GithubHelp logo

Comments (6)

michaelklishin avatar michaelklishin commented on September 15, 2024

I think Sunspot at some point used #solr_index that was aliased to index if that wasn't defined already. This is a dead simple solution and it worked well for them. So I suggest doing that with elastic_search_index being the canonical method name.

from retire.

karmi avatar karmi commented on September 15, 2024

Yeah, that's what @pacoguzman suggests in #9. There's no discussion it's the easiest, simplest way to accomplished the isolation.

I don't like the semantics of that, though. With tire_index, or elasticsearch_index, it still makes some sense. But what about tire_mapping or elasticsearch_mapping (and settings)? This has nothing to do with Tire not ElasticSearch, but with the index corresponding to the model.

And then, what about eg. MyClass.percolate? That would have to be also „prefixed”, for consistency... How would the source look like when all the Tire methods would be prefixed like this in a lame attempt of achieving isolation? How would the RDoc look like? Silly.

So, no easy answers here...

from retire.

michaelklishin avatar michaelklishin commented on September 15, 2024

Well, elastic_search_mapping still has something to do with ES in my opinion because if you stop using ES or provide full-text search at all, that method won't be necessary. I think it is not one of those cases when readability or semantics are the most important properties. The goal is to avoid method conflicts and still keep names meaningful (to me that means "hinting at ES"). Going for readability is likely to yield a solution that will be significantly more complex and will take days to develop & fully test out.

from retire.

karmi avatar karmi commented on September 15, 2024

DONE! https://github.com/karmi/tire/blob/1255bfc9964dff2b053776ff7993d792022aff29/lib/tire/model/search.rb#L157-169

from retire.

karmi avatar karmi commented on September 15, 2024

So, @antares, it was a bit more of work in the end :), but I just could not have stand having a Tire::Model::Search::ClassMethods::es_search and Tire::Model::Search::ClassMethods::es_index and es_<WHATEVER> in the source.

Many thanks to my guiding light @svenfuchs for keeping me on the straight path! :)

from retire.

svenfuchs avatar svenfuchs commented on September 15, 2024

haha :)

you're welcome, buddy

<3

from retire.

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.