This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2012-07-03 11:35:57,621][INFO ][node ] [Xandu_71f67394-f394-4f56-bf3a-de677bb8099b] {0.19.0}[16798]: stopping ... | |
[2012-07-03 11:35:58,939][DEBUG][action.search.type ] [Xandu_71f67394-f394-4f56-bf3a-de677bb8099b] [226577095] Failed to execute fetch phase | |
org.elasticsearch.search.SearchContextMissingException: No search context found for id [226577095] | |
at org.elasticsearch.search.SearchService.findContext(SearchService.java:451) | |
at org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:424) | |
at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:344) | |
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchQueryThenFetchAction.java:149) | |
at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction$2.run(TransportSearchQueryThenFetchAction.java:136) | |
at java.util.concurrent.Th |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -XPUT 'http://localhost:9200/index1/type1/1' -d '{ | |
"type1" : { | |
"user" : "kimchy", | |
"post_date" : "2009-11-15T14:12:12", | |
"message" : "trying out Elastic Search" | |
} | |
}' | |
--------------------------Search with an invalid query----------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.elasticsearch.action.ActionFuture; | |
import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest; | |
import org.elasticsearch.action.admin.indices.create.CreateIndexRequest; | |
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest; | |
import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse; | |
import org.elasticsearch.action.admin.indices.refresh.RefreshRequest; | |
import org.elasticsearch.action.get.GetRequest; | |
import org.elasticsearch.action.get.GetResponse; | |
import org.elasticsearch.action.index.IndexRequest; | |
import org.elasticsearch.action.index.IndexResponse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def query = QueryBuilders.inQuery("type1index", "type1", "relatedObjectIdPropetyInChild", QueryBuilders.....) | |
SearchRequest searchRequest = new SearchRequest(); | |
SearchSourceBuilder ssb = new SearchSourceBuilder(); | |
ssb.query(query); | |
searchRequest.source(ssb); | |
searchRequest.indices(new String[]{"type2index"}); | |
searchRequest.types("type2"); | |
client.search(searchRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String indexName = "perftestIndex" | |
String childType = "child" | |
String parentType = "parent" | |
QueryStringQueryBuilder childQuery = QueryBuilders.queryString("value:1"); | |
//When I run this query on and continuously updated index it runs very fast and returns at most in 5 msecs | |
SearchRequest searchRequest = new SearchRequest(); | |
SearchSourceBuilder ssb = new SearchSourceBuilder(); | |
ssb.query(childQuery); | |
searchRequest.source(ssb); |