Hi ,
I am writing the problem again :
I have a big server of 25 gb ram on it.
And i have a index of 13 gb . When i am running only textQuery it giving me
results very fast say 10 mili sec.
but when i an using boundary box its taking 200+ mili sec in query
execution.
How i have created the Index given below.
------Indexing------------
/*This is the mapping i have created
*/
String mapping =
XContentFactory.jsonBuilder().startObject().startObject("type")
.startObject("properties").startObject("point").field("type",
"geo_point").field("lat_lon", true).endObject().endObject()
.endObject().endObject().string();
//And this is who i am indexing it
brb.add(client.prepareIndex("test", "type",
j+"").setSource(jsonBuilder().startObject()
.field("recid", tmp[1])
.field("mergefield", tmp[4])
.field("mappedfsn", tmp[0].replaceAll(""", ""))
.startObject("point").field("lat",
Double.parseDouble(lati)).field("lon",
Double.parseDouble(longi)).endObject()
.endObject())
);
------------Search------------
response = client.prepareSearch() // from NY
.setQuery(filteredQuery(termQuery("mappedfsn",mapped),
geoBoundingBoxFilter("point").cache(true).topLeft(latt+ spreadOnLatitude,
longii+ spreadOnLongitude).bottomRight(latt- spreadOnLatitude,
longii-spreadOnLongitude)))
.setSize(NumRes).execute().actionGet();
This is how i am searching. Where i m wrong in this.
Regards
Prashant
On Wed, Feb 1, 2012 at 3:13 PM, Shay Banon kimchy@gmail.com wrote:
Whats was not lucky? What did not work?
On Wednesday, February 1, 2012 at 6:31 AM, BeyondLimit wrote:
hi Shay,
i guess you are talking about like this
String mapping =
XContentFactory.jsonBuilder().startObject().startObject("type")
.startObject("properties").startObject("point").field("type",
"geo_point").field("lat_lon", true).endObject().endObject()
.endObject().endObject().string();
But then also no luck. Can anybody help me out. Explaining better way
of using BoundaryBox search in java.
Regards
Prashant
On Jan 31, 10:33 pm, BeyondLimit prashant.vi...@gmail.com wrote:
Hi Thanks for the reply.
But can you share something using java , coz i am new to CURL .
It will be great if u can explain i java language.
Any java example which explains what you are saying.
Regards
Prashant
On Jan 31, 10:27 pm, Shay Banon kim...@gmail.com wrote:
Also note, that having the index in ram drive will not matter that much,
since by default the bbox checks are done in memory with values loaded. For
indexed type execution, it will help.
On Tuesday, January 31, 2012 at 7:26 PM, Shay Banon wrote:
You can try and use different execution mode (documented under type at the
bottom herehttp://
Elasticsearch Platform — Find real-time answers at scale | Elastic...) to
have it indexed instead of done in memory. As explained there, you will
need to have the geo_point type mapping index the lat/lon as well in this
case.
On Tuesday, January 31, 2012 at 6:39 PM, BeyondLimit wrote:
Hi there ,
Actually i have just stated using Elastic Search , and i have a
situation where in i have to search in the Boundary of lat/long .
When i have created the boundary and performed the search using java
code given below.
client.prepareSearch() .setQuery(filteredQuery(textQuery("mappedfsn",
mapped), geoBoundingBoxFilter("location").topLeft(latt+
spreadOnLatitude, longii+ spreadOnLongitude).bottomRight(latt-
spreadOnLatitude, longii-
spreadOnLongitude))).setSize(NumRes).execute().actionGet();
I found the search taking too much of time (200 mili sec on the Big
Server with 24gb of ram on it and i kept index on the Ram Disk too)
Now if i remove the boundingbox condition i get the result in no time
say 20 mili sec.
Can any body help me on this.
Thanks in advance.
Regards
Prashant