Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    bigmodem
    @bigmodem
    http --session=admin :6543/api/customers _aggs.my_agg.terms.field==state
    I found the _aggs parameter can't be used to implement nested aggregations like:
    {
      "aggs": {
        "colors": {
          "terms": {
            "field": "color"
          },
          "aggs": {
            "avg_price": {
              "avg": {
                "field": "price"
              }
            }
          }
        }
      }
    }
    So I want to use body parameter to get my nested aggregations, my command is
     http --session=admin :6543/api/customers  body=="{_source:false,aggs:{types:{terms:{field:\"type\"},aggs:{avg_id:{avg:{field:\"customer_id\"}}}}}}"
    But I always get documents from server instead of a aggregation!
    bigmodem
    @bigmodem
    Most of important I found I can't change ES mappings in my schema
    There is only a _db_settings in schema field and I think there would be a _es_mappings for each field in next version.
    I think all nefertari or nefertari_sqa must be improved to solve above issues.
    bigmodem
    @bigmodem
    I use python 3.5.2 in OS X 10.11.6
    nefertari (0.7.0)
    nefertari-sqla (0.4.2)
    pyramid (1.7.3)
    pyramid-jinja2 (2.6.2)
    pyramid-sqlalchemy (1.6)
    pyramid-tm (1.0)
    ramses (0.5.3)
    SQLAlchemy (1.1.2)
    SQLAlchemy-Utils (0.32.9)
    nekopep
    @nekopep
    hello
    I've just installed ramses and tryed the pyramid scaffold associated
    I've installed mongodb and elastcisearch, I manage to run the example
    but I can't manage to POST to the api :/
    when I run:
    http POST 192.168.1.7:6543/api/items name=banane description='bananes jaunes'
    I got:
    "message": "Bad or missing param '_asdict'",
    Any idea??
    Robert
    @RHSman
    Hi, Awesome product!! I'm trying to add a unique requirement for my post inserts. I need the unique key to be lift_name, resort. I am sure its nice and easy but can't find docs and on _db_settings. Thanks Rob
    Robert
    @RHSman
    and I also need to add geo data. Is there a way to do this to make the most of elasticsearch's geo spatial search? Thanks
    GHApps
    @GHapps
    Hi there - have a couple of questions of the architecture of this product. 1) Can it be plugged in to an existing Elasticsearch index and provide an api for it. 2) Why do the tutorial seem to need both postgressql and elasticsearch? e.g https://www.elastic.co/blog/make-an-elasticsearch-powered-rest-api-for-any-data-with-ramses
    Jonathan Stoikovitch
    @jstoiko

    @RHSman you might want to set your lift_name as a primary key:https://ramses.readthedocs.io/en/stable/fields.html#primary-key

    re: ES geo data, it is not supported but it shouldn't be too hard to add. if you have some spare time and would like to implement it, feel free to submit a PR

    Jonathan Stoikovitch
    @jstoiko
    @GHapps 1) it could but it would require to write a RAML file that describes the exact same schemas/mappings as your ES index. one way to achieve this would be to create a Ramses app, and compare the ES index generated by Ramses to the existing ES index. And then step-by-step, try to reproduce the same mappings. another way would be to write you RAML file and build your Ramses app without caring too much about the old EX index and write a script that takes the data in your old index and POSTs it to your new API... I am sure there are other ways.
    2) currently Postgres (or Mongodb) is used for writes and Elasticsearch for reads, that's the way it is designed. there has been some discussions and work around decoupling the two and allowing reads/writes to Postgres only as well as r/w to Elasticsearch only for some scenarios, it mights makes sense actually. However that work has never been completed. Feel free to take a look though, this work is in a branch of Neferari (the lower-level API framework layer): https://github.com/ramses-tech/nefertari/tree/engine-refactor
    Jerome Krieg
    @miaoulafrite
    Hi guys! Congratulations for this nice project, just came across it
    I'm quite new to python, so my question may sound dumb, pardon me in advance. I was wondering why you've chosen Pyramid and not Falcon (https://falconframework.org) - is that intended?
    Robert
    @RHSman
    @jstoiko The ability to choose a backend (pg or ES) I think would be really useful, I have had to 'manipulate' ES mappings to be for my use case (mostly identifying key records where I don't have an ID as an example). Mappings to ES, as a hack I override the mapping part as its just too limiting and then run a mapping against the indexes. If I have get time I'll get to that Mappings component as it really adds another layer of control via the RAML.
    Re key: I set the lift_name as primary but what if I have a lift with same name but different resort? I have fixed my issue in the workflow but again, super useful at the RAML level.
    GEO: Yes, I'll get on that as it really takes ES as a backend service to the next level!!!
    On another note, I'll be trying KiBi (https://siren.solutions/kibi/) on this as a logical analytics layer.
    Robert
    @RHSman
    FYI: if you want to do exact matching in query string from API's make sure you map the es field to keyword and encase the string in %22 (unicode "). Lost a day to that ;)
    cassassi
    @cassassi
    Hello, i have troubles making a many to many relationship with ramses. I think that ramses doesn't take it into account.
    We have two tables Structures (IdStruct (pk), ...) & Fields (IdField (pk), ...) with a many to many relationship. Thus, this relationship results in a third table Propriety (IdStruct (fk), IdField (fk)).
    We would like to implement these relations but failed to find some examples.... Do you know how to do that with Ramses?
    amritsinghbains
    @amritsinghbains
    Hey there ! Wanted to know if you can help with the raml parser, I want to get the schemas name and the included file name when we execute raml.loadfile()
    Jonathan Stoikovitch
    @jstoiko
    not sure which parser you're referring to but there is not raml.loadfile() in Ramses...
    amritsinghbains
    @amritsinghbains
    Derek P. Moore
    @derekm
    Looks like you guys are developing raml-for-jaxrs. I'm using jaxrs-to-raml on endpoints with UUID fields. How can I teach jaxrs-to-raml-cli about java.util.UUID types? Thanks!
    jtodd5578
    @jtodd5578
    I am completely new to Ramses. When following the guide at https://www.elastic.co/blog/make-an-elasticsearch-powered-rest-api-for-any-data-with-ramses, pserve local.ini complains Exception: TransportError(400, u'mapper_parsing_exception', u'No handler for type [string] declared on field [_pk]')
    What might cause such error?
    All setting is is default exception psql connection url is set to my local postgresql which is just a clean install as well (db is created with gii_api).
    jtodd5578
    @jtodd5578
    Digging a bit I notice basically it comes from the item type is set to string which is not used in elasticsearch newer version (I use elasticsearch v6.0).
    Change nefertari's elasticsearch.py file around at line 249 forcing type, obtained from model_cls.get_es_mapping(), in dict to text temporarily fix the problem.
    But where are this data coming from? Which file or path do engine read that particular mapping? I've modified all items.json type of string to text already under folder venv and gii_api, but that doesn't fix the problem.
    jtodd5578
    @jtodd5578
    It looks like the schema is defined within api.raml where there is a line called schema: !include <schema json file>
    But it's weird even changing schema json file's type to text, ramses still complains _pk and country type is string
    That is already been changed to "type": "text" within country section.
    jtodd5578
    @jtodd5578
    In addition to that problem, is the field _db_settings can be omitted?
    I have more than 1k fields so I would rather avoid manual annotate all fields.
    jtodd5578
    @jtodd5578
    Is it possible to delegate RAML call to actually call some elasticsearch restful call instead? For example, in api.raml where the endpoint is /gii_countries/find_by_key. When hitting the find_by_key endpoint, it actually calls elasticsearch api like curl http://localhost:port/index/doc_type -d {... elasticsearch json call } -H "Content-Type: application/json"?
    Raj
    @rja907
    Hi, people! I'm new to Ramses and I think I'd love to learn about it. Is there any step-by-step tutorial?
    Derek P. Moore
    @derekm
    fwiw, I've had a lot more success with swagger-core's jaxrs2 integration in CDI environments