Question about spring-elasticsearch

Hi all

i use spring-elasticsearch, I want to know the documents indexed by this
factory where they are stored ??

--
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.

It depends:

  • do you use the factory to connect to a node (TransportClient or Client from a Client Node)? If so, documents are in your node.
  • do you use the factory to start an embedded node? If so, documents are stored on your local node (look for a data dir) from where you start your java code.

You can set it up using Elasticsearch Platform — Find real-time answers at scale | Elastic

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 18 mars 2013 à 16:30, Ammar Yahia yahia.ammar.info@gmail.com a écrit :

Hi all

i use spring-elasticsearch, I want to know the documents indexed by this factory where they are stored ??

--
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.

--
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.

I use a separate elasticsearch instance (we'll call inst1), which is empty
(I delete the data folder), and in my web application I am using the
factory spring-elasticsearch, i use this declaration in

application context <elasticsearch:node id="esNode" />
<elasticsearch:client node="esNode" id="esClient" />

elasticsearch instance in inst1 is up, when I start my application I
notice that there are indexes that are added in my inst1, so they are sent
by the instance elasticsearch who is started by the factory
spring-elasticsearch; and in my web-application i don't find data folder
that should contains the different informations sent to inst1.

--
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.

so different information is stored in the node launched by the factory
spring-elasticsearch ?? how can I delete these different data?

--
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.

So you are using a Node which is client only?
By default, Nodes are regular ones (means that they hold data).

You can log the path using debug level:
https://github.com/dadoonet/spring-elasticsearch/blob/master/src/main/java/fr/pilato/spring/elasticsearch/ElasticsearchNodeFactoryBean.java#L69

If you don't find files data, that probably means that you have somewhere an es.properties file or an elasticsearch.yml file in your classpath.
An example of es.properties can be found here: https://github.com/dadoonet/spring-elasticsearch/blob/master/src/test/resources/es.properties

That said, are you sure that you want to hold data in your web app and not only on ES nodes (inst1)?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 18 mars 2013 à 17:25, Ammar Yahia yahia.ammar.info@gmail.com a écrit :

I use a separate elasticsearch instance (we'll call inst1), which is empty (I delete the data folder), and in my web application I am using the factory spring-elasticsearch, i use this declaration in

application context <elasticsearch:node id="esNode" />
<elasticsearch:client node="esNode" id="esClient" />

elasticsearch instance in inst1 is up, when I start my application I notice that there are indexes that are added in my inst1, so they are sent by the instance elasticsearch who is started by the factory spring-elasticsearch; and in my web-application i don't find data folder that should contains the different informations sent to inst1.

--
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.

--
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.

I can't see your concern.

What do you want to achieve here?

Hold data in inst1 only?
Hold data in inst1 AND webapp?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 18 mars 2013 à 17:35, Ammar Yahia yahia.ammar.info@gmail.com a écrit :

so different information is stored in the node launched by the factory spring-elasticsearch ?? how can I delete these different data?

--
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.

--
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.

I want to delete all the data that exists in elasticsearch, I delete the
data folder in inst1, but when I run my web application data that have been
deleted will be loaded back into my ins1

--
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.

I do not declare a file as es.properties, I just edit the
application-context by <elasticsearch:node id="esNode" />

                      <elasticsearch:client node="esNode" id="esClient" 

/>

and inin my java code I declare the client as follows @Autowired

private Client esClient;

--
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.

esClient.prepareSearch().....

--
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.

You want to clean your cluster each time you restart or only once?

curl -XDELETE http://localhost:9200 will clean everything on your cluster.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 18 mars 2013 à 18:06, Ammar Yahia yahia.ammar.info@gmail.com a écrit :

I do not declare a file as es.properties, I just edit the application-context by <elasticsearch:node id="esNode" />
<elasticsearch:client node="esNode" id="esClient" />

and inin my java code I declare the client as follows @Autowired
private Client esClient;

--
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.

--
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.

thx david, this is what I want , deleting all data from my web-application
and inst1,

--
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.