elasticsearch-suggest-plugin icon indicating copy to clipboard operation
elasticsearch-suggest-plugin copied to clipboard

Very slow requests

Open chokosabe opened this issue 12 years ago • 12 comments

Just installed the plugin (thanks for all the great work).

Just using it with the instructions and each query is taking ~ 2 secs (100,000 records, 8 gb ram) using the fuzzy suggester.

chokosabe avatar May 20 '13 15:05 chokosabe

I'll try to reproduce this with some data... not sure where this might come from.

How big is your FST according to the suggest stats API? How big is your ES_HEAP_SIZE?

spinscale avatar May 20 '13 19:05 spinscale

Also, can you add your mapping and a sample query which is being slow?

spinscale avatar May 20 '13 20:05 spinscale

suggestStats: http://pastebin.com/NRtggyfq ES_HEAP_SIZE is 3gb

query: 'http://localhost:9200/product_en/product-type/__suggest' -d '{"field":"name", "type":"fuzzy", "term":"car"}'

chokosabe avatar May 23 '13 07:05 chokosabe

Just to make sure: Every query you fire is slow, right? The first query you are sending initializes the in-memory data structure. This query is supposed to be slow. When you are sending another query for the same field it should be really fast.

If you are sending any query for a field two times, it remains slow, right?

Another question: Is the name field very long or quite short? Do you have a rough average? I want to reproduce your problem as close as possible, so I need as good information as possible.

spinscale avatar May 23 '13 11:05 spinscale

Hi there. Yes, every request is slow and they take the same time.

The field names can be very long. Up to 150 chars in some cases...

chokosabe avatar May 23 '13 11:05 chokosabe

I have an idea what the problem is (thanks to posting the statistics). Need to investigate though.

spinscale avatar May 23 '13 18:05 spinscale

Hey,

I fixed the issue. Can you test it before I release a new version to the maven repo?

git clone https://github.com/spinscale/elasticsearch-suggest-plugin
cd elasticsearch-suggest-plugin
mvn -DskipTests=true package
cd path/to/your/elasticsearch/inst
bin/plugin -install suggest -url file:///path/to/github/directory/elasticsearch-suggest/target/releases/elasticsearch-plugin-suggest-0.90.0-0.6.2-SNAPSHOT.zip

That would be awesome! Many thanks for your help!

spinscale avatar May 24 '13 07:05 spinscale

Having trouble compiling/building with Maven.

chokosabe avatar May 26 '13 16:05 chokosabe

I just released a new version, can you test that one? Version is 0.6.2

spinscale avatar May 26 '13 21:05 spinscale

Please test with 0.90.0-0.6.3 - which is a bugfix version

spinscale avatar May 31 '13 18:05 spinscale

any feedback here? Can I close this one?

spinscale avatar Aug 13 '13 19:08 spinscale

Hi Alex,

the issue is still there. I guess most people will move onto the suggest api thats part of the package now (once someone puts in some documentation). Thanks for all the help.

chokosabe avatar Aug 14 '13 13:08 chokosabe