Commit Graph
1238 Commits
Author SHA1 Message Date
Joshua Carp 073db90ae8 Set application/x-ndjson content type on bulk requests.
Resolves #609
2017-10-04 16:07:55 -04:00
Nick LangandGitHub 0397527d12 Merge pull request #637 from jmcarp/fix-travis-target
Fix travis link in build status.
2017-10-04 13:48:09 -06:00
Nick LangandGitHub e04c905134 Merge pull request #647 from fxdgear/nick/fix_test_children_are_reindex_correctly
Use version 6.0.0
2017-10-04 09:12:37 -06:00
Nick Lang 24e5564f37 using 6.0.0-beta2 for travis 2017-09-07 09:27:06 -05:00
Nick Lang 71222abeff somewhere somehow a non ascii char got in these doc strings 2017-09-06 23:23:29 -05:00
Israel BlancasandHonza Král 0eba1bf2c1 Add requirements.txt in the example (#644) 2017-08-29 22:39:38 +02:00
Glen Smith 392aedda5d Remove occurrences of non-ASCII chars from docs 2017-08-23 19:33:32 +02:00
Joshua Carp 468e87c85a Fix travis link in build status. 2017-08-20 23:52:20 -04:00
Jon BanafatoandHonza Král cf4f23c3bc Add Python 3.5 and 3.6 to tox.ini (#613)
Bring `tox.ini` up to date with `setup.py` and `.travis.yml`.
2017-08-15 15:44:13 +01:00
Tyler James HardenandHonza Král cd769b98a5 Additional fixes for UTF-8 surrogate escapes (#629)
* Fixes non UTF-8 surrogateescapes 

Surrogate escapes in Unicode (non UTF-8 encoding) will be properly escaped with backslashes when encountered, versus breaking the transport layer.

* Removes erroneous bytes decode and reraises

Fixes to re-raise exceptions with different reasons
Removes erroneous bytes decode where bytes are desired

* Adds test for surrogate escapes in body

Tests that a surrogate escape sequence is properly escaped
with backslashes to produce valid UTF-8.

* Use proper byte sequence for surrogate

* Use if/else versus pass

* Proper Unicode surrogate escape

Use a Unicode Surrogate that properly escapes in both Python2 and Python3

* Passing test once surrogatepass is used

Updating test to pass once surrogatepass is used

* Use surrogatepass instead of backslashreplace

This replicates behavior between Python 2 and Python 3

* Fixes whitespace

* Simplifies with no exception block

Since `surrogatepass` will only ever explicitly occur when there are surrogate bytes encountered, there is no need to let the error throw and catch it, also uses single-quotes for consistency.

* Fixes Unicode Surrogate Escapes in request logging

This is the same fix as accepted for ElasticSearch requests, except applied to the request logging mechanisms.
2017-08-15 15:41:32 +01:00
Nick LangandGitHub 843ce9ee24 Merge pull request #628 from fxdgear/nick/fix_encode_error
better handling of bytestrings in _escape
2017-08-08 14:13:21 -06:00
Nick Lang a5b228a26d better handling of bytestrings in _escape
Fixes #627
2017-08-08 12:50:04 -06:00
Honza Král 4e6f635711 6.x compatibility in tests 2017-08-01 15:54:59 -04:00
Honza Král aca83e85ae Update the upstream broken test list 2017-08-01 15:12:09 -04:00
Honza Král 3be98b0a09 first pass for 6.0 compatibility 2017-07-31 19:17:52 -04:00
Honza Král 95cf68a0bc Merge branch 'backoff' 2017-07-24 13:07:55 -04:00
Honza Král 8f73594cac Tests for retry logic in streaming_bulk 2017-07-22 13:40:22 -04:00
Honza Král ba8772a66f When retrying we get deserialized data
This is just a hotfix until a better solution with proper tests come
along
2017-07-22 13:13:53 -04:00
Honza Král f1267b52f0 Fix urllib3 version to be compatible with requests 2017-07-20 14:02:29 -04:00
Honza Král 2c0f6d8c04 refactor the helpers a bit for more consistent errors
Now every error (either returned by streaming_bulk or collected by bulk)
contains the original data as well
2017-07-20 13:53:23 -04:00
Honza Král a16679b2cf draft of docs for backoff helper 2017-07-18 18:08:00 -04:00
Honza Král b31b5ddae6 Merged backoff into streaming_bulk 2017-07-18 17:44:43 -04:00
Honza Král 66c380420f Forgot to assign data 2017-07-18 16:20:36 -04:00
Honza Král 957fcad34b Do not serialize the data in bulk_data
This can lead to multiple serializations when retrying with backoff
helper
2017-07-18 16:15:08 -04:00
Honza Král accb19ab90 Action must be a dict, not serialized string 2017-07-18 15:45:43 -04:00
Honza Král f9f4f0c61a have _chunk_actions always return data and actions 2017-07-18 14:18:09 -04:00
Honza Král c8231cad0e Initial implementation of a backoff bulk helper 2017-07-18 14:02:02 -04:00
Victor KandHonza Král 57362aa8c7 Fix elasticsearch.exceptions.__all__ (#621) 2017-07-14 16:50:39 +02:00
Honza Král 620afc667f Set a limit on the internal queue of the parallel_bulk helper
Fixes #547
Solution taken from https://bugs.python.org/msg90067
2017-07-12 23:48:58 +02:00
Glen SmithandHonza Král a523159e9e Add "--with-id" to default settings passed to nose testing. (#608)
This enables "--failed" option to only run tests that failed in the last run
2017-07-12 23:13:03 +02:00
Tyler James HardenandHonza Král d6fb95353e Fixes non UTF-8 surrogateescapes (#612)
Fixes non UTF-8 surrogateescapes 

Surrogate escapes in Unicode (non UTF-8 encoding) will be properly escaped with backslashes when encountered, versus breaking the transport layer.
Fixes #611
2017-07-11 16:58:46 +02:00
Nick LangandHonza Král 9320ee7eaf add optional host and path param on load.py (#601)
If you want/need to load data into a different es cluster just specify either the
 * -H/--host option
 * -p/--path option

ex: python load.py --host http://123.123.123.123:9200 -p /home/code/elasticsearch
2017-06-15 16:49:26 +02:00
Honza Král 24169821ac add the remote namespace 2017-06-14 19:25:53 +02:00
Honza Král 49af6df631 Added missing APIs 2017-06-14 19:25:11 +02:00
Glen SmithandGitHub 59bc56f3c8 Merge pull request #602 from fxdgear/nick/bump_year
bump year to 2017
2017-06-14 19:01:43 +02:00
Nick Lang c18d16326e bump year to 2017 2017-06-14 17:20:06 +02:00
Honza Král 58f16d13ec bump travis to 5.4.1 2017-06-14 16:43:46 +02:00
Honza Král ce9465afef Test things to the testing dir 2017-06-14 16:42:47 +02:00
Patryk KrawaczyńskiandHonza Král d67c483e1d 404 - Page Not Found (#594)
Task Management API moved to single page.
2017-05-21 14:06:07 -07:00
Patryk KrawaczyńskiandHonza Král 5de989be07 Fix some spelling errors in docstrings from 2015. (#571) 2017-05-19 14:49:42 -07:00
Honza Král b803c2dd16 Add python 3.5 and 3.6 to setup.py 2017-05-19 12:49:05 -07:00
Honza Král aea9824d53 Version bump for release 2017-05-18 19:11:38 +02:00
Honza Král 72105e3f4c Allow the example/load.py script to load other repos from CLI 2017-05-18 10:11:34 -07:00
Nick LangandHonza Král 211ee236fb Add script to run ES in docker container (#590)
* Adding start_elasticsearch.sh script to run elastic search on the host
in a docker container at http://localhost:9200

* update readme in instructions on how to use script
2017-05-15 22:28:26 +02:00
Honza Král d336c571b9 [WIP] remove scheme checking 2017-05-15 22:01:54 +02:00
Honza Král 1aee1bb030 Removing obsolete gitmodules 2017-05-15 18:51:35 +02:00
Nick LangandHonza Král 790c80fedb bumping requests to 2.0.0+ (#587)
requests < 2.0.0 causes the following attribute error:
    AttributeError: type object 'Session' has no attribute 'prepare_request'
2017-05-15 18:36:51 +02:00
Honza Král 3b41c3bca7 Add develop extra to allow for easy dependency install 2017-05-10 16:52:58 +02:00
Patryk KrawaczyńskiandHonza Král 6ccc08520c doc_type = type to sample (#572)
elasticsearch.exceptions.RequestError: TransportError(400, 'illegal_argument_exception', 'request [/_cluster/nodes/hotthreads] contains unrecognized parameter: [doc_type]')

https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html
2017-05-10 16:33:38 +02:00
Honza Král 5c658fcfb8 Allow pipeline as a parameter in bulk actions
Fixes #564
2017-04-17 22:12:41 +02:00