David I did that only. See my original mail in this thread. - I copied the whole data dir which is XYZ/resources/firstcommit - Then I used this code on that dir
- Node node = nodeBuilder().clusterName("./resources/firstcommit").node(); - Client client = node.client(); - MatchQueryBuilder qb = QueryBuilders.matchQuery("user", "kimchy"); - SearchRequestBuilder srb = client.prepareSearch("twitter").setTypes("tweet"); - SearchResponse big = srb.setQuery(qb).execute().actionGet(); - SearchHit[] results = big.getHits().getHits(); - This produced the following error SearchPhaseExecutionException: Failed to execute phase [query], all shards failed I read somewhere that this should work, any idea where I am going wrong? Thanks Kartik On Sun, May 24, 2015 at 5:00 PM, David Pilato <da...@pilato.fr> wrote: > In that case: > - use a simple clustername or let the default one > - just copy the data dir > > It should work. > > -- > David ;-) > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs > > Le 24 mai 2015 à 12:36, Kartik Singhal <gkkart...@gmail.com> a écrit : > > I want them to use Elasticsearch standalone. They will just download my > code and the indexed data and then with the help of my code they will query > the data. > > On Sun, May 24, 2015 at 3:59 PM, David Pilato <da...@pilato.fr> wrote: > >> It means that your users are connected on the same network or that you >> want them to use Elasticsearch in standalone ? >> >> >> >> -- >> David ;-) >> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs >> >> Le 24 mai 2015 à 12:22, Kartik Singhal <gkkart...@gmail.com> a écrit : >> >> Hi david >> >> Thanks for the reply. Actually my problem is that I first have to index >> data on my server, then I will be deploying this data so that other users >> can query it on their different different computers using the code I >> provide to them. How can I do that? >> >> Thanks >> regards, >> Kartik >> >> On Sun, May 24, 2015 at 3:45 PM, David Pilato <da...@pilato.fr> wrote: >> >>> I think you misunderstand how Elasticsearch works. >>> >>> You don't need to share a filesystem across multiple nodes. >>> >>> Just start a first node with a cluster name like "mycluster". Index your >>> data. >>> >>> Start a client node or a transport client, which connects to your >>> running cluster and you are done. >>> >>> >>> >>> >>> -- >>> David ;-) >>> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs >>> >>> Le 24 mai 2015 à 12:00, Kartik Singhal <gkkart...@gmail.com> a écrit : >>> >>> Hi >>> >>> In elastic search java api, suppose I am building the indexed data using >>> this client >>> >>> *Node node = nodeBuilder().clusterName(".* >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> */resources/firstcommit").node();Client client = >>> node.client();IndexResponse response = client.prepareIndex("twitter", >>> "tweet", "1") .setSource(jsonBuilder() >>> .startObject() .field("user", >>> "kimchy") .field("postDate", new >>> Date()) .field("message", "trying out >>> Elasticsearch") .endObject() ) .execute() >>> .actionGet();* >>> >>> This indexed data is stored in folder XYZ/resources/firstcommit. >>> My question is how to query this indexed data in java on some other >>> client on other computer. >>> Is there any way in which I can give the path and the already indexed >>> data can be imported, then I can perform queries on it? >>> >>> I copied the whole data folder on other computer and ran the following >>> code on other computer. This gave the following exception >>> >>> >>> - Node node = >>> nodeBuilder().clusterName("./resources/firstcommit").node(); >>> - Client client = node.client(); >>> - MatchQueryBuilder qb = QueryBuilders.matchQuery("user", "kimchy"); >>> - SearchRequestBuilder srb = >>> client.prepareSearch("twitter").setTypes("tweet"); >>> - SearchResponse big = srb.setQuery(qb).execute().actionGet(); >>> - SearchHit[] results = big.getHits().getHits(); >>> >>> >>> This shows >>> >>> search.SearchPhaseExecutionException: Failed to execute phase [query], >>> all shards failed >>> Please tell me how can I transfer just the indexed data from one >>> computer to another and then query it. >>> >>> Thank You >>> regards, >>> Kartik >>> >>> -- >>> Please update your bookmarks! We have moved to >>> https://discuss.elastic.co/ >>> --- >>> 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+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/elasticsearch/CAF5%2Bda1cLPz__39D9eAZmuw%3Drh10hha1ahGSqHPisASOVVh-pw%40mail.gmail.com >>> <https://groups.google.com/d/msgid/elasticsearch/CAF5%2Bda1cLPz__39D9eAZmuw%3Drh10hha1ahGSqHPisASOVVh-pw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >>> -- >>> Please update your bookmarks! We have moved to >>> https://discuss.elastic.co/ >>> --- >>> 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+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/elasticsearch/B37D48AF-F31E-462E-9E2F-5EBE91712030%40pilato.fr >>> <https://groups.google.com/d/msgid/elasticsearch/B37D48AF-F31E-462E-9E2F-5EBE91712030%40pilato.fr?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Regards, >> Kartik Singhal >> Final Year Undergraduate >> Computer Science and Engineering >> The LNM Institute of Information Technology, Jaipur >> >> -- >> Please update your bookmarks! We have moved to >> https://discuss.elastic.co/ >> --- >> 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+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elasticsearch/CAF5%2Bda3Krv%2B%3DgqsnptBNOG8BHM9OaUCqVonNEkZntTrdrFB4KA%40mail.gmail.com >> <https://groups.google.com/d/msgid/elasticsearch/CAF5%2Bda3Krv%2B%3DgqsnptBNOG8BHM9OaUCqVonNEkZntTrdrFB4KA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> Please update your bookmarks! We have moved to >> https://discuss.elastic.co/ >> --- >> 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+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elasticsearch/072F8196-A166-4D94-A673-DEEFA76C9B92%40pilato.fr >> <https://groups.google.com/d/msgid/elasticsearch/072F8196-A166-4D94-A673-DEEFA76C9B92%40pilato.fr?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Regards, > Kartik Singhal > Final Year Undergraduate > Computer Science and Engineering > The LNM Institute of Information Technology, Jaipur > > -- > Please update your bookmarks! We have moved to https://discuss.elastic.co/ > --- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/CAF5%2Bda0ZKUon7nW1i2AAgf2v6fkbWgUrmQpKKPLKTeFfjv7t_A%40mail.gmail.com > <https://groups.google.com/d/msgid/elasticsearch/CAF5%2Bda0ZKUon7nW1i2AAgf2v6fkbWgUrmQpKKPLKTeFfjv7t_A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > -- > Please update your bookmarks! We have moved to https://discuss.elastic.co/ > --- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/6A3857AE-7899-4026-A895-178AE1ACF6C4%40pilato.fr > <https://groups.google.com/d/msgid/elasticsearch/6A3857AE-7899-4026-A895-178AE1ACF6C4%40pilato.fr?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Regards, Kartik Singhal Final Year Undergraduate Computer Science and Engineering The LNM Institute of Information Technology, Jaipur -- Please update your bookmarks! We have moved to https://discuss.elastic.co/ --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAF5%2Bda14Ey3Oq4i%2BsXA%2BPRhVDDvM0v-0%2BY8u2Dsii11hL3B-_w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.