Script filters are inherently slow due to the fact that they cannot leverage the inverted index in order to skip efficiently over non-matching documents. Even if they were written in assembly, this would likely still be slow.
What kind of filtering are you trying to do with scripts? On Thu, Aug 14, 2014 at 8:42 AM, avacados <[email protected]> wrote: > How to access field data faster from native (java) script ??? should i > enable 'doc values'? > > I am already using doc().getField() and casting to long. It is date field > type. But whenever, my argument to script changes, it has poor performance > for search query. Subsequent call with same argument has good performance. > (might be because _cache is true for that script filter.) > > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/afd89e62-0773-4684-904d-53805d9d7358%40googlegroups.com > <https://groups.google.com/d/msgid/elasticsearch/afd89e62-0773-4684-904d-53805d9d7358%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j5MH4Pw_sLy9M7Tr01gH0L-QQbRfXQSQZg7iYrFT_EQtA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
