Hi Fatima, Thanks for your help, One question : Where do i put that codes
to create client etc.
01//Create Client
02Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name"
,"localtestsearch").build();
03TransportClient transportClient = new TransportClient(settings);
04transportClient = transportClient.addTransportAddress(new
InetSocketTransportAddress("localhost",9300));
05return (Client) transportClient;
06
07//Create Index and set settings and mappings
08
09CreateIndexRequestBuilder createIndexRequestBuilder =
client.admin().indices().prepareCreate(indexName);
10createIndexRequestBuilder.execute().actionGet();
11
12//Add documents
13IndexRequestBuilder indexRequestBuilder =
client().prepareIndex(indexName, documentType, documentId);
14//build json object
15XContentBuilder contentBuilder =
jsonBuilder().startObject().prettyPrint();
16contentBuilder.field("name", "jai");
17contentBuilder.stopObject();
18indexRequestBuilder.setSource(contentBuilder);
19IndexResponse response = indexRequestBuilder .execute().actionGet();
20
21//Get document
22GetRequestBuilder getRequestBuilder = client().prepareGet(indexName,
type, id);
23getRequestBuilder.setFields(new String{"name"});
24GetResponse response = getRequestBuilder.execute().actionGet();
25String name = response.field("name").getValue().toString();
Should i put this in elasticsearch config file or write in java file ? I'm
sorry i don't know java and other programming languages.
On Monday, June 10, 2013 1:02:19 PM UTC+8, Fatima Castiglione Maldonado
wrote:
Hi
I am new to the list and to elasticsearch
I installed the plugins manually, following this tutorial
(he explains how to install _head, a web interface; installing _river is
similar)
Getting started with ElasticSearch
2013/6/9 <nyam...@gmail.com <javascript:>>
hi, i downloaded elasticsearch from elasticsearch's website, Did you mean
that official elasticsearch website's download has all neccesary rivers or
any plugins? OR should I download the rivers or any plugins from
elasticsearch website?
Sorry my bad english
--
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
--
Fátima Castiglione Maldonado
castiglion...@gmail.com <javascript:>
____
,'_ |
_______|||
< ) .------.
-----------,------.-' ,-'
-.
| | | ,' `.
,' | | ,' `.
| _,-' |__ / \
_,'-' `. `---.___|_____________ \
.--' -----. | _____________________ `-. ----- |
| ___| | | \ ,- \ |
| ___| |===========================((|) | |
| | | | _____________________/ `- / |
`--._ -----' | _________________,-' ----- |
`.-._ ,' __.---' | /
| `-. | \ /
`. | | `. ,'
| | | `. ,'
_____,-----------------
-. -._ _,-' <___________________________)
------'
| _| |
`.____|
=================================
--
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.
For more options, visit https://groups.google.com/groups/opt_out.