ES myindex/_analyze?analyzer=...&text=... is very slow. Is there any way to speed it up

I would like to use myindex/_analyze?analyzer too get list of tokens ES is
using in my query to attempt client side highlighting.
I noticed that it is very slow relative to the query itself. While query
takes 20-30ms (browser measured roundtrip time) analyze call takes over
200ms
Is there any way to speedup this call?

Thank you,
Alex

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

If you are using Java, then you can recreate the analysis service locally
and avoiding doing network calls. Your ElasticSearch config file and
another external files such as synonyms would need to be in your classpath.
Look at the test classes for implementation details.

--
Ivan

On Mon, Mar 25, 2013 at 9:23 AM, AlexR roytmana@gmail.com wrote:

I would like to use myindex/_analyze?analyzer too get list of tokens ES is
using in my query to attempt client side highlighting.
I noticed that it is very slow relative to the query itself. While query
takes 20-30ms (browser measured roundtrip time) analyze call takes over
200ms
Is there any way to speedup this call?

Thank you,
Alex

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

Thank you Ivan, at the moment it is a pure REST with ExtJS client

On Mon, Mar 25, 2013 at 12:37 PM, Ivan Brusic ivan@brusic.com wrote:

If you are using Java, then you can recreate the analysis service locally
and avoiding doing network calls. Your ElasticSearch config file and
another external files such as synonyms would need to be in your classpath.
Look at the test classes for implementation details.

--
Ivan

On Mon, Mar 25, 2013 at 9:23 AM, AlexR roytmana@gmail.com wrote:

I would like to use myindex/_analyze?analyzer too get list of tokens ES
is using in my query to attempt client side highlighting.
I noticed that it is very slow relative to the query itself. While query
takes 20-30ms (browser measured roundtrip time) analyze call takes over
200ms
Is there any way to speedup this call?

Thank you,
Alex

--
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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/xu3Imq-P6yc/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, 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.

On Monday, March 25, 2013 5:23:30 PM UTC+1, AlexR wrote:

I would like to use myindex/_analyze?analyzer too get list of tokens ES is
using in my query to attempt client side highlighting.
I noticed that it is very slow relative to the query itself. While query
takes 20-30ms (browser measured roundtrip time) analyze call takes over
200ms
Is there any way to speedup this call?

hey alex,

I'd be curious what kind analysis call you are doing to reproduce this
rather slowish call. 200ms is a lot for just an analysis call so I'd want
to get to root of the problem.

simon

Thank you,
Alex

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

Hi Simon,

"all_kstem": {
"tokenizer": "standard",
"filter": ["standard", "lowercase", "stop",
"stem_possessive_english", "kstem"]
}

http://localhost/search/award/_analyze?&text=laboratory%20equipment%20manufacturing&analyzer=all_kstem

ran the above 5 times in a row took between 130 and 182ms watching it in
firebug. search on the same string with highlighting etc was taking only
20ms per firebug

ES 0.20.5

On Mon, Mar 25, 2013 at 2:24 PM, simonw
simon.willnauer@elasticsearch.comwrote:

On Monday, March 25, 2013 5:23:30 PM UTC+1, AlexR wrote:

I would like to use myindex/_analyze?analyzer too get list of tokens ES
is using in my query to attempt client side highlighting.
I noticed that it is very slow relative to the query itself. While query
takes 20-30ms (browser measured roundtrip time) analyze call takes over
200ms
Is there any way to speedup this call?

hey alex,

I'd be curious what kind analysis call you are doing to reproduce this
rather slowish call. 200ms is a lot for just an analysis call so I'd want
to get to root of the problem.

simon

Thank you,
Alex

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/xu3Imq-P6yc/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, 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 will try this hopefully tomorrow.

simon

On Monday, March 25, 2013 7:29:20 PM UTC+1, AlexR wrote:

Hi Simon,

"all_kstem": {
"tokenizer": "standard",
"filter": ["standard", "lowercase", "stop",
"stem_possessive_english", "kstem"]
}

http://localhost/search/award/_analyze?&text=laboratory%20equipment%20manufacturing&analyzer=all_kstem

ran the above 5 times in a row took between 130 and 182ms watching it in
firebug. search on the same string with highlighting etc was taking only
20ms per firebug

ES 0.20.5

On Mon, Mar 25, 2013 at 2:24 PM, simonw <simon.w...@elasticsearch.com<javascript:>

wrote:

On Monday, March 25, 2013 5:23:30 PM UTC+1, AlexR wrote:

I would like to use myindex/_analyze?analyzer too get list of tokens ES
is using in my query to attempt client side highlighting.
I noticed that it is very slow relative to the query itself. While query
takes 20-30ms (browser measured roundtrip time) analyze call takes over
200ms
Is there any way to speedup this call?

hey alex,

I'd be curious what kind analysis call you are doing to reproduce this
rather slowish call. 200ms is a lot for just an analysis call so I'd want
to get to root of the problem.

simon

Thank you,
Alex

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/xu3Imq-P6yc/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com <javascript:>.
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.