Questions about doc_values and ttl

So i want to filter and sort on a field. Can i only use doc_values or
should i also index the field for filtering ? (meaning is doc_values only
for sorting/faceting)

Since doc_values accepts 'long' data types, does it also accept 'dates'
since they are stored as 'long' ?

If a document has expired but hasn't yet been deleted, is it returned when
searching ?

Thanks

--
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/6e764788-f131-4fcb-aeef-2d5f7963c68c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi,

On Tue, Dec 10, 2013 at 2:30 PM, ddorian43 dorian.hoxha@gmail.com wrote:

So i want to filter and sort on a field. Can i only use doc_values or
should i also index the field for filtering ? (meaning is doc_values only
for sorting/faceting)

Filtering will work without indexing the field if the filter that you would
like to use has a 'field_data' execution mode. For example, the range
filter[1] is able to use field data to execute the filter.

However, please note that the field_data execution mode of filters is
very different from the index execution mode and may be much slower if
your filter matches few documents (and vice-versa, it may behave better if
your filter matches most documents).

Since doc_values accepts 'long' data types, does it also accept 'dates'
since they are stored as 'long' ?

Indeed, dates support doc values.

If a document has expired but hasn't yet been deleted, is it returned when
searching ?

Yes, documents which have expired but are not deleted yet will be returned.

Thanks

[1]
Elasticsearch Platform — Find real-time answers at scale | Elastic

--
Adrien Grand

--
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/CAL6Z4j6U8mn1D%2Br088uN2A9ero4NgBK%2BTZOnHZipw4gf3CL4hQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.