Storing K/V configuration in elasticsearch


(Caoilte O'Connor) #1

Hi,
Quick, silly question. I want to control switching over from searching on
one field to another using a configuration property. Since the
configuration property is set and used by two applications that only use
elasticsearch, need to be able to update it regularly and to have it
persist, it seems to make most sense to store the configuration property in
Elasticsearch along with the data it refers to.

Is there a better way of doing this than simply setting up a new index with
one document and one field on it?

Is there an existing admin index that it would make sense for me to set the
property in?

Thanks

Caoilte

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ab98af94-7274-48b6-ad8c-9c3faa226090%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Binh Ly-2) #2

If you're asking if there is a way to use a field name in your query say
"field1", and then have it actually look at another field say "fieldxyz" or
"fieldabc" at query time, no there is no such capability. The best way to
do this is probably in some kind of configuration that is part of your
application. You certainly can store this information in a document in ES,
but you still have to query it in your application startup and then adjust
your queries yourself in code dynamically.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1cf6df3b-2d2d-49c8-bcf0-0b5f68c03a98%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3