Giter Club home page Giter Club logo

elastix's People

Contributors

akaul avatar alanpeabody avatar balexand avatar bglusman avatar bravely avatar briankereszturi avatar cdegroot avatar evuez avatar fabienhenon avatar glaucomorandini avatar juanperi avatar kianmeng avatar macoshita avatar manukall avatar mlewis033 avatar norpan avatar ontofractal avatar rockwood avatar rodrigues avatar vitorleal avatar walterbm avatar werbitzky avatar yellowaj avatar ylester avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elastix's Issues

Set request headers/support non-shield authorization header?

We're using elastic search on AWS which requires HMAC key signing as described here http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html

This elixir library implements it (https://github.com/bryanjos/aws_auth) nicely, but not sure best way to extend HTTP module to allow for auth other than shield. Happy to contribute if I can (and may have to fork library just to add it, if I can't find a clean way to work around), but I'm just getting my feet wet, and not sure if you have a strong preference for how it be done. Thanks!

Custom Headers/AWS auth.

The README describes supporting custom headers, however the same commit that adds that documentation seems to have actually removed support for custom headers. (03daf52)

I would like to be able to use this library with elasticsearch on AWS and I am happy to contribute towards a solution.

Some ideas:

  • Put back the custom header support, but make the API explicit (does it expect a module? function? what? - basically no misleading .call()). Maybe just a {Module, :fun, []} tuple that gets arguments prepended an applied.
  • Add an Elastix.HTTP.Authentication behaviour, which both shield and aws could implement. Could be configurable as config :elastix, auth: Elastix.HTTP.Authentication.Shield.

In the latter case AWS support could be added to this repo, added as a second hex package, or even just provide an example implementation in docs.

Update the Hex repo with latest changes

Currently the version of elastix on Hex is 0.4.0. That version seems to be missing some of the recent updates (most notably support for custom headers). Is it possible to update the hex repo to the new version that includes recent changes?

Also, I noticed all documentation seems to be missing from the Hex docs page. Is adding documentation open and feasible for new contributors?

Document.index_new is producing the wrong url

Calling Document.index_new/4 or Document.index_new/5 produces the wrong url because it appends a double backslash (e.g. "/movies/movie//"). This can cause problems with AWS authentication since it affects the request signature.

Seems like a minor fix so I would be glad to make a PR if needed.

API to update Settings

Hey

Is there a API to update the index settings or to setup it together the mapping using Elastix?

Search multiple indices

I would like to be able to search multiple indices. I suggest the search function is extended so that the index parameter can be an array.

Is it possible to override default HTTP lib used in elastix?

Description
Currently, we're using HTTPoison by default. This might introduce issues like we won't be able to trace this request.
If possible, can we write behavior for HTTP lib and accept that from config?
or is it possible to trace in the current situation and I am not aware of?

Wrong @spec for Index.exists?

The @spec is wrong for Index.exists?.
It's specificed as.

@spec exists?(elastic_url :: String.t(), name :: String.t()) :: HTTP.resp()

But it does not return a HTTP.resp(), it returns {:ok, boolean()} | {:error, HTTPoison.Error.t()} (the :ok case is just a boolean, not the full Elasticsearch response)

Elasticsearch 7 Mapping

How is the code now to assign as mapping settings? I'm trying a few ways with a new application, but I only have this return error:

Types cannot be provided in placement mapping requests unless the include_type_name parameter is set to true. "

Elasticsearch host with path (http://myhost/namespacedir) is stripped of path (/namespacedir)

Given an elasticsearch target, namespaced into a sub-path by nginx,
when I pass the full host+path into Elastix.Search.search (and other functions also)
then the path component of the elasticsearch url is stripped away.

I believe this code is problematic, in search.ex

def make_path(index, types, query_params, api_type \\ "_search") do
    path_root = "/#{index}"

When the index+type+queryparam path is passed to URI.merge, in prepare_url,
the preceding forwardslash in the index path replaces any existing path in the host url,
since URI.merge follows Relative Resolution of RFC 3986

Timeout on HTTP Request

Hi,

On a very long search request, I quickly get : %HTTPoison.Error{id: nil, reason: :timeout}

How to setup the timeout ?

Regards and thank you for your work !

Can not perform delete without auth options

delete from Document was not working for me without implementing a variant that includes auth options.
I would get

{:error,
 %HTTPoison.Error{
   reason: {:tls_alert,
    {:unknown_ca,
     ~c"TLS client: In state wait_cert at ssl_handshake.erl:2138 generated CLIENT ALERT: Fatal - Unknown CA\n"}},
   id: nil
 }}

After trying my variant it worked. Am I missing something or is this missing? I could open a PR for that change if somebody gives me green light. ๐ŸŸข

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.