Best way for autocomplete fast search
Hello All,
what is the best method for search a portion of text in a non-indexed global?
I need to implement an autocomplete kind of search, in a global of >1M registers (text type, not $lb)
Maybe the best way would be use a SQL mapped class, with 'Bitmap' indexes?
Thanks in advance!
Discussion (4)0
Comments
Try using iFind indices:
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GIKNOW_ifind
See aside iFind.
I long ago did the tests, using Bible, at searching for of any substring.
- without an index
select Id, Para from BookPara where Para like '%огон%'
- with index
select Id, Para from BookPara where id %FIND search_index(ParaStemmedI,'*огон*',1)
| The number of found rows | Performance (sec.) | Global references | |
|---|---|---|---|
| without an index | 287 | 0.518 | 151845 |
| with index | 287 | 0.009 | 1006 |
The difference is obvious.
Hi, Romero!
Look at this project which does search for Documentation with iKnow and iFind by @Konstantin.Eremin. Demo. Github.
It uses iKnow for autocomplete functionality in a search box.
Thank you guys, for your fast answers! :-)