Missing results from es when using simple curl

I am trying out elastic search for the first time. I just have 1 node and 1
index.

curl -XPUT http://localhost:9200/testing/dummy/1 -d '{
"snapshotTime" : "2012-10-31T13:31:21",
"ratio" : "50",
"description" : "sample description"

}'

I have indexed 500 such dummies to index 'testing'.
http://localhost:9200/testing/dummy/1
.
.
.
.
http://localhost:9200/testing/dummy/500

Now, when I tried a matchAll query with this data set,

curl -XGET 'http://localhost:9202/_all/_search?pretty=true' -d '
{
"query" : {
"matchAll" : {}
}
}'
I get back only 10 results and they are random every time. However, the
total hits remain 500. The hits array only contain 10 entries. Am I missing
something?

Thanks.

--

Hello,

You can specify how many results you get back via "size":

Best regards,
Radu
On Nov 6, 2012 9:07 PM, "Dinesh Sriram" dineshsriram1989@gmail.com wrote:

I am trying out Elasticsearch for the first time. I just have 1 node and
1 index.

curl -XPUT http://localhost:9200/testing/dummy/1 -d '{
"snapshotTime" : "2012-10-31T13:31:21",
"ratio" : "50",
"description" : "sample description"

}'

I have indexed 500 such dummies to index 'testing'.
http://localhost:9200/testing/dummy/1
.
.
.
.
http://localhost:9200/testing/dummy/500

Now, when I tried a matchAll query with this data set,

curl -XGET 'http://localhost:9202/_all/_search?pretty=true' -d '
{
"query" : {
"matchAll" : {}
}
}'
I get back only 10 results and they are random every time. However, the
total hits remain 500. The hits array only contain 10 entries. Am I missing
something?

Thanks.

--

--

Thanks. Is there any maximum limit on the size?

On Tuesday, November 6, 2012 2:26:36 PM UTC-5, Radu Gheorghe wrote:

Hello,

You can specify how many results you get back via "size":
Elasticsearch Platform — Find real-time answers at scale | Elastic

Best regards,
Radu
On Nov 6, 2012 9:07 PM, "Dinesh Sriram" <dineshsr...@gmail.com<javascript:>>
wrote:

I am trying out Elasticsearch for the first time. I just have 1 node and
1 index.

curl -XPUT http://localhost:9200/testing/dummy/1 -d '{
"snapshotTime" : "2012-10-31T13:31:21",
"ratio" : "50",
"description" : "sample description"

}'

I have indexed 500 such dummies to index 'testing'.
http://localhost:9200/testing/dummy/1
.
.
.
.
http://localhost:9200/testing/dummy/500

Now, when I tried a matchAll query with this data set,

curl -XGET 'http://localhost:9202/_all/_search?pretty=true' -d '
{
"query" : {
"matchAll" : {}
}
}'
I get back only 10 results and they are random every time. However, the
total hits remain 500. The hits array only contain 10 entries. Am I missing
something?

Thanks.

--

--

If you need to export your results (for big sizes), you should look at the scan&scroll features.

HTH

David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 6 nov. 2012 à 20:30, Dinesh Sriram dineshsriram1989@gmail.com a écrit :

Thanks. Is there any maximum limit on the size?

On Tuesday, November 6, 2012 2:26:36 PM UTC-5, Radu Gheorghe wrote:

Hello,

You can specify how many results you get back via "size":
Elasticsearch Platform — Find real-time answers at scale | Elastic

Best regards,
Radu

On Nov 6, 2012 9:07 PM, "Dinesh Sriram" dineshsr...@gmail.com wrote:

I am trying out Elasticsearch for the first time. I just have 1 node and 1 index.

curl -XPUT http://localhost:9200/testing/dummy/1 -d '{
"snapshotTime" : "2012-10-31T13:31:21",
"ratio" : "50",
"description" : "sample description"

}'

I have indexed 500 such dummies to index 'testing'.
http://localhost:9200/testing/dummy/1
.
.
.
.
http://localhost:9200/testing/dummy/500

Now, when I tried a matchAll query with this data set,

curl -XGET 'http://localhost:9202/_all/_search?pretty=true' -d '
{
"query" : {
"matchAll" : {}
}
}'
I get back only 10 results and they are random every time. However, the total hits remain 500. The hits array only contain 10 entries. Am I missing something?

Thanks.

--

--

Hello Dinesh,

I'm not sure, but I think it's MAX_INT-1 or something like that. But
if you want to go through a lot of results, you almost certainly would
be better off if you set your type of search to scan[0] and then
scroll[1] through the results.

That said, the scan type doesn't support sorting[2].

Best regards,
Radu

http://sematext.com/ -- Elasticsearch -- Solr -- Lucene

[0] Elasticsearch Platform — Find real-time answers at scale | Elastic
[1] Elasticsearch Platform — Find real-time answers at scale | Elastic
[2] Elasticsearch Platform — Find real-time answers at scale | Elastic

On Tue, Nov 6, 2012 at 9:30 PM, Dinesh Sriram
dineshsriram1989@gmail.com wrote:

Thanks. Is there any maximum limit on the size?

On Tuesday, November 6, 2012 2:26:36 PM UTC-5, Radu Gheorghe wrote:

Hello,

You can specify how many results you get back via "size":
Elasticsearch Platform — Find real-time answers at scale | Elastic

Best regards,
Radu

On Nov 6, 2012 9:07 PM, "Dinesh Sriram" dineshsr...@gmail.com wrote:

I am trying out Elasticsearch for the first time. I just have 1 node and
1 index.

curl -XPUT http://localhost:9200/testing/dummy/1 -d '{
"snapshotTime" : "2012-10-31T13:31:21",
"ratio" : "50",
"description" : "sample description"

}'

I have indexed 500 such dummies to index 'testing'.
http://localhost:9200/testing/dummy/1
.
.
.
.
http://localhost:9200/testing/dummy/500

Now, when I tried a matchAll query with this data set,

curl -XGET 'http://localhost:9202/_all/_search?pretty=true' -d '
{
"query" : {
"matchAll" : {}
}
}'
I get back only 10 results and they are random every time. However, the
total hits remain 500. The hits array only contain 10 entries. Am I missing
something?

Thanks.

--

--

--

Thank you David and Radu. I will look into that.

On Wednesday, November 7, 2012 2:44:57 AM UTC-5, Radu Gheorghe wrote:

Hello Dinesh,

I'm not sure, but I think it's MAX_INT-1 or something like that. But
if you want to go through a lot of results, you almost certainly would
be better off if you set your type of search to scan[0] and then
scroll[1] through the results.

That said, the scan type doesn't support sorting[2].

Best regards,
Radu

http://sematext.com/ -- Elasticsearch -- Solr -- Lucene

[0]
Elasticsearch Platform — Find real-time answers at scale | Elastic
[1] Elasticsearch Platform — Find real-time answers at scale | Elastic
[2] Elasticsearch Platform — Find real-time answers at scale | Elastic

On Tue, Nov 6, 2012 at 9:30 PM, Dinesh Sriram
<dineshsr...@gmail.com <javascript:>> wrote:

Thanks. Is there any maximum limit on the size?

On Tuesday, November 6, 2012 2:26:36 PM UTC-5, Radu Gheorghe wrote:

Hello,

You can specify how many results you get back via "size":
Elasticsearch Platform — Find real-time answers at scale | Elastic

Best regards,
Radu

On Nov 6, 2012 9:07 PM, "Dinesh Sriram" dineshsr...@gmail.com wrote:

I am trying out Elasticsearch for the first time. I just have 1 node
and
1 index.

curl -XPUT http://localhost:9200/testing/dummy/1 -d '{
"snapshotTime" : "2012-10-31T13:31:21",
"ratio" : "50",
"description" : "sample description"

}'

I have indexed 500 such dummies to index 'testing'.
http://localhost:9200/testing/dummy/1
.
.
.
.
http://localhost:9200/testing/dummy/500

Now, when I tried a matchAll query with this data set,

curl -XGET 'http://localhost:9202/_all/_search?pretty=true' -d '
{
"query" : {
"matchAll" : {}
}
}'
I get back only 10 results and they are random every time. However,
the
total hits remain 500. The hits array only contain 10 entries. Am I
missing
something?

Thanks.

--

--

--