Hi,
I would like to know how to query the same result by using Java transport client.
In Elasticsearch Head:
I fire the query below through POST API _search:
{
"query": {},
"from": 100,
"size": 20,
"sort": [
{
"date_of_post": {
"order": "asc"
}
}
]
}
It returns result with total hits = 102953. See attachment.
The difference is obvious: you set an index name indexName (which is not shown in your question) and you use a strange "null" query. Use a correct index name setting or drop it. Do not use setQuery(null), instead drop setQuery(null) at all or use a sound query method.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.