Yes, we did consider adding timestamps to documents at the time, but it
seemed more appropriate to use the _meta tag since it's an index-level
property (in our case at least). Maybe the _meta tag could be made
accessible from outside the mapping: since it's not used by es, updating it
shouldn't have any impact; just a thought.
What would be the most efficient way to query the "latest" (maximum) value
when using a timestamp field on the documents?
On Fri, Dec 30, 2011 at 11:15, Shay Banon firstname.lastname@example.org wrote:
Well, expensive in the sense that it needs to be broadcasted to the
cluster and persisted (the whole metadata). Even without the timestamp
feature, you can add a timestamp to a document indexed, and find the latest
one, you don't need the timestamp to have that ability.
On Fri, Dec 30, 2011 at 6:02 PM, Philippe Laflamme <
Yes, that's what we ended up with. At the time, the document timestamps
didn't exist. I wasn't aware that updating the mapping was expensive. Is
this the case even when it's not chagning at all (except under _meta)?
On Fri, Dec 30, 2011 at 10:06, Shay Banon email@example.com wrote:
Storing the last update in the _meta part of the mapping? So does that
mean that for each document indexed, you update the mapping? Thats
On Fri, Dec 30, 2011 at 4:56 PM, Philippe Laflamme <
We manually store timestamps for creation and last update of our
indices within the "_meta" tag of a mapping. Then we use "Get Mapping" to
fetch these timestamps.
An alternative is to use the new timestamps of the documents in the
index and search on that field, maybe using the term_stats facet to obtain
Hope it helps,
On Thu, Dec 29, 2011 at 12:38, Ivan Brusic firstname.lastname@example.org wrote:
I do not think it is possible to get the date/time of the last time an
index was updated. Perhaps someone can prove otherwise. I would be a
bit tough in a distributed environment.
For info on the fields, you can use the mapping API:
Fields that are not explicitly defined in your initial mapping will be
added dynamically to the mapping. The GET mapping call will contain
On Thu, Dec 29, 2011 at 5:59 AM, MC email@example.com wrote:
Is it possible to retrieve index metadata via the API? In terms of
metadata, I am looking to be able to dynamically retrieve things
- The date/time at which an index was last updated
- The field names (currently) within an index
- The field types (string/boolean/date/numeric) currently in the
- The field storage scheme (i.e. stored, indexed, etc...)
and the like.