Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi GET API #1068

Closed
kimchy opened this issue Jun 27, 2011 · 0 comments
Closed

Multi GET API #1068

kimchy opened this issue Jun 27, 2011 · 0 comments

Comments

@kimchy
Copy link
Member

kimchy commented Jun 27, 2011

Multi GET API allows to get multiple documents based on an index, type (optional) and id (and possibly routing). The response includes a doc array with all the documents each element similar in structure to the get API. Here is an example:

curl localhost:9200/_mget?pretty=1 -d '{
    "docs" : [
        {
            "_index" : "test",
            "_type" : "type",
            "_id" : "1"
        },
        {
            "_index" : "test",
            "_type" : "type",
            "_id" : "2"
        }
    ]
}'

The mget endpoint can also be used against an index (in which case its not required in the body):

curl localhost:9200/test/_mget?pretty=1 -d '{
    "docs" : [
        {
            "_type" : "type",
            "_id" : "1"
        },
        {
            "_type" : "type",
            "_id" : "2"
        }
    ]
}'

And a type:

curl localhost:9200/test/type/_mget?pretty=1 -d '{
    "docs" : [
        {
            "_id" : "1"
        },
        {
            "_id" : "2"
        }
    ]
}'

In which case, the ids element can directly be used to simplify the request:

curl localhost:9200/test/type/_mget?pretty=1 -d '{
    "ids" : ["1", "2"]
}'
@kimchy kimchy closed this as completed in 9bf686e Jun 27, 2011
emilykmarx pushed a commit to emilykmarx/elasticsearch that referenced this issue Dec 26, 2023
…ce_errors_in_log` (elastic#1068)

Introduce a new setting named silence_errors_in_log with exact same behavior of failure_type_logging_whitelist. It print a deprecation log message if failure_type_logging_whitelist is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant