GithubHelp home page GithubHelp logo

eriky / esclient Goto Github PK

View Code? Open in Web Editor NEW
63.0 63.0 22.0 95 KB

A lightweight and easy to use Python client for ElasticSearch

License: BSD 3-Clause "New" or "Revised" License

Python 99.54% Shell 0.46%

esclient's People

Contributors

2xyo avatar eriky avatar isnowfy avatar iwai avatar kapoorabhish avatar msurdi avatar scamurcuoglu 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esclient's Issues

Installing via python setup.py fails missing "requests" module.

Hello,

# esdump -h
Traceback (most recent call last):
  File "/usr/local/bin/esdump", line 7, in <module>
    import esclient
  File "/usr/local/lib/python2.7/dist-packages/esclient.py", line 1, in <module>
    import requests
ImportError: No module named requests

After this, I installed easy_install + pip. Then removed it with "pip uninstall esclient".

At this point, installing with "pip" it worked.

esdump and esimport progress

I am currently running an es dump and there is no progress i know u cant let me know the % done but would be useful to at least know how many documents have been written already.

You can also grab the total number of documents at the start and then use that as a guildline and then every so often make that call again and readjuest the number of percentage done. you could also wait to the end and just show a number bigger then 100% if it was not for disk io monitoring and watch ls -la i would not know if it was working or my connection froze

Too much time in import

Hi,

First of all - good work, this plug in really works.

The only issue i see is the Import takes time. I had an index just of 1k size document each, total 273781 document and when i imported it - the time consumed was around 20-30 minutes. The size of the whole index is around 50MB.

We are planning to do backup of 50GB or 100GB data, and based on above it will be like day's when the import completes.

Any hints or ideas appreciated to resolve this?

thanks
pranav.

Bulk indexing

Implement bulk indexing to speed up large indexing jobs

set minimum version of requests

Since it dependence on Response.text, it would be cool if the minimum version could be set to 0.10.0, where this method was introduced.

json encoding python types

Hi, one obvious problem is the lack of support for encoding custom types... for example datetime.datetime currently fails saying its not JSON serializable.

The best way to do this would be to pass an encoder class to the json.dumps() call in send_request. I was thinking if you could supply an encoder and decoder class when you call the ESClient constructor it would give the maximum flexibility, but still keep the ESClient API simple.

Split library into API calls and supporting methods

Splitting the library into two parts:

  • the ElasticSearch API
  • a higher level library that makes it even easier to use ElasticSearch

The higher level library could, for example, contain methods to:

  • do a query of type query_string without having to manually create the search options.
  • change replication settings for indexes with a single api call

Crash, if elasticsearch holds no indices

Traceback (most recent call last):
File "/usr/local/bin/esdump", line 66, in
scroll_id = es.scan(query_body = query_body, indexes = indexes)
File "/usr/local/lib/python2.7/dist-packages/esclient.py", line 235, in scan
return result["_scroll_id"]
KeyError: '_scroll_id'

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.