Hi,
I'm assessing ES as a tool to help with a specific problem. We have some
expensive sql to run against a database that takes 300ms. there are 1000
or so rows, so we need to page over these results. I though ES would be a
perfect tool to do this, but the results I've seen, while being reasonable,
are not compelling. I'm using the bulk update to insert each row as a doc:
BulkRequestBuilder bulkRequest = c.prepareBulk();
for (int i = 0; i < 1000; i++) {
bulkRequest.add(c.prepareIndex("pages", "row")
.setSource(new
JsonObject().putString("user1", "kimchy")
.putString("user2", "kimchy")
.putString("user3", "kimchy")
.putString("user4", "kimchy")
.putString("user5", "kimchy")
.putString("user6", "kimchy")
.putString("user7", "kimchy")
.putString("user8", "kimchy")
.putString("user9", "kimchy")
.putNumber("rowcount", i)
.putNumber("rs", rs)
.encode())
);
}
BulkResponse bulkResponse = bulkRequest.execute().actionGet();
The bulk execute takes somewhere around 300ms.
QueryBuilder queryStringBuilder =
QueryBuilders.queryString("rs:" + rs);
SearchRequestBuilder requestBuilder =
c.prepareSearch("pages")
.setTypes("row")
.setQuery(queryStringBuilder)
.addSort("rowcount", SortOrder.DESC)
.setSize(10).setFrom(100);
SearchResponse response = requestBuilder.execute().actionGet();
The search execute takes between 50 and 60ms.
Am I doing it wrong, or does this seem like reasonable performance? I'm
using an intel mac pro with SSD.
Cheers!
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/10fbfe7e-b12c-49b3-94b4-4ccea13ebd8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.