Updated README to markdown and added sinan #1

Open
wants to merge 103 commits into
from

Projects

None yet
@tsloughter

It would be nice if you don't mind incorporating these changes into your fork. The sinan pieces won't get in the way of the rebar building and the other changes aren't much of anything.

I'd been thinking of getting back to updating this project recently so glad to see you have been working on it which motivates me :).

I've also tagged this current code as 0.2.0 and added a package to agner's repo for @master and 0.2.0.

tsloughter and others added some commits Nov 25, 2011
@tsloughter tsloughter updated for sinan usage as an option over rebar 8a69f51
@tsloughter tsloughter added travis config 164edb3
@tsloughter tsloughter use rebar for tests 9587c22
@tsloughter tsloughter moved to master mochiweb mochijson2 56f857d
@tsloughter tsloughter switched to R15B for travis 235827e
@tsloughter tsloughter added source wrapping around shell instructions 9ca82c8
@tsloughter tsloughter merged with irccloud a61dc59
@tsloughter tsloughter updated travis file to get rebar deps 7bee7d6
Tristan Sloughter fix start-dev script and remove gas and sinan 8580b36
Tristan Sloughter allow get request to have body d1dc99a
Tristan Sloughter remove erls_query_constructor d9aa148
Tristan Sloughter switch to hackney/jsx, simplify and add tests 4bad07a
Tristan Sloughter fix travis build to not run CT f94ccf0
Tristan Sloughter parse response and decode json a6f3d75
Tristan Sloughter fix dialyzer error 4156db3
Tristan Sloughter support passing encoded json to index functions 44f1d8e
Tristan Sloughter add ct to readme cbfb0df
@stefanrusek stefanrusek Support complex search queries
If the requested query is a proplist, then send it as json. This allows
for compound queries.
1ce27dc
@tsloughter tsloughter Merge pull request #6 from stefanrusek/master
Add support for complex search queries
5f50af3
@cstar cstar Fix bulk indexing dec48d3
@tsloughter tsloughter Merge pull request #7 from cstar/master
Fix bulk indexing
ea363bb
@marcelog marcelog new param ctimeout, updated to hackney 0.4.4 c1257e8
@tsloughter tsloughter Merge pull request #8 from marcelog/connect_timeout_and_hackney_0_4_4
new param ctimeout, updated to hackney 0.4.4
384a776
@marcelog marcelog closes #9, adding http_client_options 5f57031
@tsloughter tsloughter Merge pull request #10 from marcelog/marcelog_http_client_options_9
closes #9, adding http_client_options
93bfa93
@bluesalt bluesalt Change dependencies' protocol from git to https
Some servers behind firewall will only support http/https but not git
protocol due to company security policy
21d5780
@tsloughter tsloughter Merge pull request #11 from bluesalt/dep_protocol
Change dependencies' protocol from git to https
67791e7
@arjan arjan hackney:request can also return {error, ...} b71e3c6
@tsloughter tsloughter Merge pull request #12 from arjan/master
hackney:request can also return {error, ...}
cb5499d
@marcelog marcelog returning elasticsearch errors
so the caller would know what went wrong
a138dc7
@tsloughter tsloughter Merge pull request #13 from marcelog/marcelog_returning_elasticsearch…
…_errors

returning elasticsearch errors
f0af242
@marcelog marcelog allowing payload for methods like DELETE.
In its delete_by_query api, elasticsearch allows the query to
be passed in the query string, but also as a json payload. This
should allow that, and also does some cleanup, by treating the
absence of a payload as a payload of 0 size (content-length)
4ee2016
@tsloughter tsloughter Merge pull request #14 from marcelog/marcelog_delete_by_query_with_body
allowing payload for methods like DELETE.
10c753f
@marcelog marcelog adding support for percolator feature 986cf5f
@marcelog marcelog Adding delete feature for percolator 49afa03
@tsloughter tsloughter Merge pull request #15 from marcelog/marcelog_percolator_support
adding support for percolator feature
57d0635
@arjan arjan Add upsert_doc/4 and /5 5c458c8
@tsloughter tsloughter Merge pull request #16 from arjan/upsert
Add upsert_doc/4 and /5
8ed3392
@arjan arjan Upgrade hackney to 0.11.1 9471a61
@tsloughter tsloughter Merge pull request #17 from arjan/master
Upgrade hackney to 0.11.1
2be5c1b
@unbalancedparentheses

hackney uses idna. idna was updated and changed to an application. you should add to the readme that you need to start idna. check this commit:

https://github.com/tim/erlang-idna/pull/1/files?short_path=04c6e90&unchanged=collapsed#diff-86b16bb0d93bc234d5c411624be1025cR23

Owner

I'm not sure what you mean, the readme doesn't list any deps you have to start since starting erlastic_search will start all the deps for you.

Contributor

After the update of erlastic I get an error stating that idna was not started. I start idna and everything works fine.

Owner

Oh, hm, I'll have to figure out why. It should not be up to the user to do separately.

Owner

Oh, I didn't haven't his problem. Did you run with make shell?

tsloughter and others added some commits Apr 22, 2014
@tsloughter tsloughter update hackney and jsx deps f6e8360
@tsloughter tsloughter add license 475d15f
@anha0825 anha0825 New hackney return type
Same as in normal case is same function.
8ae5137
@tsloughter tsloughter Merge pull request #20 from anha0825/master
New hackney return type
1d1003f
@unbalancedparentheses unbalancedparentheses added support for creating mappings 5a81ba0
@tsloughter tsloughter Merge pull request #21 from inaka/mapping
Added support for creating mappings
37c1d5a
Andreas Hasselberg Add _stats call. 2875a1d
Andreas Hasselberg Merge branch 'master' of github.com:tsloughter/erlastic_search
Conflicts:
	src/erlastic_search.erl
1d5177e
Andreas Hasselberg Remove empty spec attribute from doc, crashes edoc. c2ff28f
Andreas Hasselberg Delete index 2265c44
@tsloughter tsloughter Merge pull request #22 from anha0825/master
Add _stats call
0b421cf
@arjan arjan Update Hackney to 0.13.1 d9e9d90
@tsloughter tsloughter Merge pull request #24 from arjan/master
Update Hackney to 0.13.1
6a7eec9
@tsloughter tsloughter update to rebar3 19eec4c
@jlecour jlecour Name and links
The server is called Elasticsearch, in one word.
The mother company has been rebranded Elastic, so links are be updated.
77d555c
@tsloughter tsloughter Merge pull request #26 from jlecour/name-and-links
Name and links
02db722
@jlecour jlecour Elasticsearch is always in the foreground
From the changelog for version 1.0 :

`Elasticsearch now runs in the foreground by default. There is no more -f flag on the command line.`

https://www.elastic.co/guide/en/elasticsearch/reference/master/_system_and_settings.html#_system_and_settings
f964914
@tsloughter tsloughter Merge pull request #27 from jlecour/elasticsearch-bin
Elasticsearch is always in the foreground
67c0621
@mdojwa mdojwa Fixed missing passing options to index_doc_with_id_opts f0c5ceb
@tsloughter tsloughter Merge pull request #29 from mdojwa/master
Fixed missing passing options to index_doc_with_id_opts
a0af3b6
@tsloughter tsloughter update travis config de56ebb
@tsloughter tsloughter version bump 86d4d60
@wk8 wk8 Adding `nodes_info/*` funs
Mapping directly to
https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html

Also fixing (?) `commas/1` which had invalid syntax, at the very least for erlang v18.x
b7e8516
@tsloughter tsloughter Merge pull request #30 from wk8/wk8/nodes_info
Adding `nodes_info/*` funs
3bac562
@tsloughter tsloughter add automatic upload to hex of tags 2c8a65d
@tsloughter tsloughter travis build tags too 41da970
@tsloughter tsloughter automatic hex publishign and use git tag for version f376ffd
@t-mw t-mw Remove redundant braces for JSON input
The proplist representing the header JSON in the first branch of 'bulk_index_docs' contains a redundant set of braces, causing jsx to throw an exception when it attempts to encode the structure. Modify the proplist to match the format expected by jsx.
46ffa96
@tsloughter tsloughter Merge pull request #31 from t-mw/patch-1
Remove redundant braces for JSON input
f138f9b
@t-mw t-mw Support binary docs as input to 'put_mapping'
`put_mapping` doesn't support taking a binary `Doc` despite its type specification. Create a guarded version of the function which does.
ab1023d
@tsloughter tsloughter Merge pull request #32 from t-mw/patch-2
Support binary docs as input to 'put_mapping'
005493e
@wk8 wk8 Making it possible to use another JSON library than `jsx`
We already use `jiffy` in our project to handle JSONs, which makes
integrating `erlastic_search` a pain, since it uses `jsx`, which
has a different way of representing JSONs in Erlang, for example:

```
1> SimpleJson = <<"{\"key\":\"value\"}">>.
<<"{\"key\":\"value\"}">>
2> jiffy:decode(SimpleJson).
{[{<<"key">>,<<"value">>}]}
3> jsx:decode(SimpleJson).
[{<<"key">>,<<"value">>}]
```

This patch makes it possible to use any JSON library, as long as it defines
the two following callbacks:

```erlang
-callback encode(json()) -> binary().
-callback decode(binary()) -> json().
```

This setting is done at compile time, by defining an `ERLASTIC_SEARCH_JSON_MODULE`
environment variable containing the name of the module containing the two
callbacks above.

Updated the specs to account for this change.
cb26702
@wk8 wk8 Wrapping the user-defined JSON library into a new `erls_json` module
Thus getting rid of the unsightly `?ERLASTIC_SEARCH_JSON_MODULE` occurrences
all over the code.

Getting rid of all the internally-built JSONs, to be able to not call `jsx`
directly any more, which could be confusing together with `erls_json`.
de5613d
@tsloughter tsloughter Merge pull request #33 from wk8/wk8/i_wanna_use_jiffy
Making it possible to use another JSON library than `jsx`
edd4dad
@wk8 wk8 Allowing asynchronous ES queries
Using hackney's option `async`

Wrapping hackney's reference in an `{async, Ref}' tuple to make it
easy to match.

Had to update the specs to account for that change
f1ed6a3
@tsloughter tsloughter Merge pull request #36 from wk8/wk8/allow_async_queries
Allowing asynchronous ES queries
f1b3b0a
Nils Ernsting Extend bulk operation to accept further information in the header row…
… of a bulk item
c7efa8b
@tsloughter tsloughter Merge pull request #38 from synlay/feature/bulk_operation_with_header
Extend bulk operation header
1cf1b82
@elbrujohalcon pyotrgalois added option to configure host and port e266207
@tsloughter tsloughter Merge pull request #40 from inaka/master
Add option to configure host and port
8a4982c
@wk8 wk8 Some index changes:
* making it possible to index without ID but with options
* making it possible to bulk index without IDs
* fixing bulk indexes which were broken if not using `jsx`
* also accounting for the fact that `erlastic_json()` can also be a map
* the only possibly breaking change is if someone out there used that
  lib to index a doc with the atom `undefined` as ID, which seems like
  a bad idea anyway (and is against the spec that it should be a binary)
c2a4e07
@wk8 wk8 Consolidating JSON encoding in one place 63b8828
@tsloughter tsloughter Merge pull request #41 from wk8/wk8/index_changes
Some index changes:
6f8fec2
@tsloughter tsloughter update locks and docs in erls_config bf90f00
@PrasadBonthu PrasadBonthu Added scroll support
Before calling search_scroll/1 function, the search_scroll/4 function should be called with index, type name and the search query. Based on the search response, "scroll_id" can be passed to search_scroll/1 to get next batch results.
eac23f4
@PrasadBonthu PrasadBonthu Corrected the function name 071e420
@PrasadBonthu PrasadBonthu Corrected spec 90431cf
@tsloughter tsloughter Merge pull request #42 from PrasadBonthu/master
Added scroll support
3c01b35
@akovari akovari the app should not depend on jsx app 33047e8
@tsloughter tsloughter Merge pull request #43 from altworx/master
the app should not depend on jsx app
a998ffa
@paulperegud paulperegud add test case for ID preservation in bulk_index_docs/2 f437e30
@paulperegud paulperegud don't ignore provided ID in bulk_index_doc/2 173da24
@tsloughter tsloughter Merge pull request #45 from paulperegud/fix_bulk_index_docs
Fix bulk index docs
50779fa
@drobakowski drobakowski Introduce get_doc_opts/5 as an equivalent to get_doc/4 including options dcf039d
@tsloughter tsloughter Merge pull request #47 from synlay/feature/get_doc_with_options
Introduce get_doc_opts/5 as an equivalent to get_doc/4 including options
bbe44f3
@drobakowski drobakowski Introduce new search function 'multi_search/2'
'multi_search/2' allows to execute multiple search requests using
the Elasticsearch endpoint '_msearch'. The function interface is
inspired by the 'bulk_index_docs' function with the difference that
the index and type parameters are missing. If needed these parameters
must be defined through the headers, as these are optionally
according to the Elasticsearch documentation.
77da96c
@tsloughter tsloughter Merge pull request #48 from synlay/feature/multi_search
Introduce new search function 'multi_search/2'
9a5c0e7
@wk8 wk8 Adding an `erlastic_search:create_index/3` fun to allow creating an i…
…ndex with custom settings

and/or mappings, as documented in
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html

Also modified `erlastic_search:create_index/2` to accept either connection params
and an index name (previous behaviour) or else an index name and a body.

This patch is entirely backwards-compatible.
5c458cb
@wk8 wk8 Adding `get_mapping/*` and `get_settings/*` funs to retrieve mappings…
… & indices
39f8450
@wk8 wk8 Adding `index_exists/*` funs
Also upgrading hackney as a dependency, since the previously included version
did not include the dialyzer fixes from
benoitc/hackney@008617c
which, in turn, made dialyzer complain about the new `case` patterns in
`erls_resource:do_request/6`
cb05390
@tsloughter tsloughter Merge pull request #50 from wk8/wk8/get_mappings_and_settings
Adding `get_mapping/*` and `get_settings/*` funs to retrieve mappings & indices
71b049d
@tsloughter tsloughter Merge pull request #49 from wk8/wk8/create_with_body
Adding an `erlastic_search:create_index/3` fun to allow creating an index with custom settings
301de63
@tsloughter tsloughter Merge pull request #51 from wk8/wk8/index_exists
Adding `index_exists/*` funs
02b88a9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment