Git Product home page Git Product logo

Comments (8)

mrkamel avatar mrkamel commented on May 26, 2024 1

i'll dig into it.

from search_cop.

mrkamel avatar mrkamel commented on May 26, 2024

hi, search_cop tries to be as database agnostic as possible and hstore is postgres only, but yeah, this can be made to work. Bit of a question is, as you already pointed out, how you specify the attributes, but it's definitely possible and i'd be willing to integrate it.

from search_cop.

DannyBen avatar DannyBen commented on May 26, 2024

I might try to tinker with it next week. For my use case, this is better:

Profile.search "settings.color = yellow"

since the whole reason for using hstore, is to allow completely arbitrary fields, so I need to avoid the requirement to define them as a search scope option.

from search_cop.

DannyBen avatar DannyBen commented on May 26, 2024

After looking at the code, and some failed attempts, I opted to ditch this hstore direction since it looks like too much work (mostly due to the fact that I am unfamiliar with the code).

If nobody else can / want to pick up this glove, feel free to close this issue (although I think it would be a cool feature still).

from search_cop.

DannyBen avatar DannyBen commented on May 26, 2024

i'll dig into it.

Thank you! And I love this gem, it literally saves me a lot of time, so I am more than willing to contribute and help where I can.

from search_cop.

mrkamel avatar mrkamel commented on May 26, 2024

You can already take a look into #60
The PR adds jsonb as well as hstore support.

Please note that it is not easily possible (by design) to allow access to arbitrary fields of an hstore/jsonb field by via some dot syntax (hstore_field.arbitrary_field: some_value).
Instead, every accessable field needs to be specified explicitly.

from search_cop.

DannyBen avatar DannyBen commented on May 26, 2024

Thanks for investing your time into it

Alright, I looked at the code. So, if I understand correctly it will allow me to use one of json stores, and still search inside it using searchcop standard syntax, assuming I declare them in the model like any other search cop field. Right?

If so, this is great!

from search_cop.

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.