C
chrisjroos
Hi,
I've just spent some time looking at the ruby classifier[1] library.
I need to index 3000 one line product names.
The default behaviour is to index items as they are inserted (at least
it would certainly appear that's what's happening based on simple
benchmarking). This causes the time to index new items to rise
exponentially. After some experimentation, I found that turning off
the automatic indexing and then manually building once all items were
added was far quicker (17 secs to add 100 items with auto indexing, 0.6
secs to add 100 items with manual index building).
I also did a quick test to confirm that the output was the same in both
cases.
I'm really just wondering why the default behaviour seems to be the
most inefficient and whether I'm missing anything obvious using the
manual build method?
Any help / pointers would be much appreciated.
Chris
[1] http://classifier.rufy.com
I've just spent some time looking at the ruby classifier[1] library.
I need to index 3000 one line product names.
The default behaviour is to index items as they are inserted (at least
it would certainly appear that's what's happening based on simple
benchmarking). This causes the time to index new items to rise
exponentially. After some experimentation, I found that turning off
the automatic indexing and then manually building once all items were
added was far quicker (17 secs to add 100 items with auto indexing, 0.6
secs to add 100 items with manual index building).
I also did a quick test to confirm that the output was the same in both
cases.
I'm really just wondering why the default behaviour seems to be the
most inefficient and whether I'm missing anything obvious using the
manual build method?
Any help / pointers would be much appreciated.
Chris
[1] http://classifier.rufy.com