Documentation error

This page has an error:
https://www.elastic.co/guide/en/elasticsearch/reference/2.1/query-dsl-terms-query.html#query-dsl-terms-lookup
The idea is to show all the tweets of the other users.

Please change:

index a tweet, from user with id 2

curl -XPUT localhost:9200/tweets/tweet/1 -d '{
"user" : "2"
}'

To be:

index a tweet, from user with id 3

curl -XPUT localhost:9200/tweets/tweet/1 -d '{
"user" : "3"
}'

I'm not sure why you think this is an error, if you run the commands you get the expected results.

1 Like

If you follow the documentation as it is you get 0 results. If you make the fix I suggest you get 1 result that is the intended point of the example.

1 Like

I just ran it then and I got one result.

1 Like

It's true that you get 0 results (warkolm, you put "user" : "1" instead of "user" : "2" ) .

But yes, it should be 1 or 3.

1 Like

Oh I see now, that was fixed in the latest docs - https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-terms-query.html#query-dsl-terms-lookup

1 Like