Yes, I guess an AbstractFactory might do the work, depending on the "type" of the client it should create the proper DataContext implementation.
2015-02-13 14:59 GMT+01:00 Kasper Sørensen <[email protected]>: > I guess if there are fundamental differences is what you can do with the > different protocols then we should consider making two different > DataContext implementations? Or what do you think? I'm just thinking it > might become a mess to internalize all the switching logic - then it could > maybe rather be two DataContexts. Maybe with a wrapper or factory that will > choose the correct implementation depending on some parameters. > > 2015-02-13 13:53 GMT+01:00 Alberto Rodriguez <[email protected]>: > > > Well, I think they have implemented a kind of interface, obviously is not > > as powerful as the one implemented for the "official" java client, have a > > look at this: https://github.com/searchbox-io/Jest/tree/master/jest > > Unfortunately > > things like the ones we are doing with the ES client to infer the schema > > and get the metadata are not possible with Jest. > > > > I guess depending of the "type" of the client (Jest/"Standard") that our > > ElasticSearchDataContext constructor will receive we should perform the > > abstraction you are talking about to infere the schema and getting the > > metadata for both "types". What do you think? > > > > Not sure how to use the HTTP client to get all the indexes & metadata > > though (is there any HTTP method that returns this kind of information, > if > > so... should we then parse the JSON response to get indexes, > metadata...??) > > > > > > > > > > > > > > 2015-02-13 13:15 GMT+01:00 Kasper Sørensen < > [email protected] > > >: > > > > > Looks to be Apache2 licensed, so that's absolutely an option. I don't > > think > > > it implements ElasticSearch's own "Client" interface (which would have > > made > > > it SO easy) ... So I guess we need a kind of abstraction to perform the > > > same operations with either a normal ES client or a JEST client? > > > > > > 2015-02-13 12:48 GMT+01:00 Alberto Rodriguez <[email protected]>: > > > > > > > Hi Kasper, > > > > > > > > There is an open source project that might match our needs. Have a > > look: > > > > Jest <https://github.com/searchbox-io/Jest> > > > > > > > > If you think that we can integrate it in MM I would be more than > happy > > to > > > > help you out. > > > > > > > > Kind regards, > > > > > > > > 2015-02-11 8:44 GMT+01:00 Kasper Sørensen < > > > [email protected] > > > > >: > > > > > > > > > Hi all, > > > > > > > > > > I have a scenario where a potential customer of ours has a hosted > > > > > ElasticSearch setup. This setup only allows connectivity through > ES's > > > > REST > > > > > protocol and that means we currently cannot connect to it with > > > MetaModel > > > > (I > > > > > think) ... I think we only support the TransportClient and > NodeClient > > > > > protocols. Did anyone of you try to connect via REST protocol > anyhow? > > > Any > > > > > clue of the effort needed if we wanted to bring REST support to > > > > MetaModel's > > > > > elasticsearch module? > > > > > > > > > > Kasper > > > > > > > > > > > > > > >
