Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well in fact I built it myself.</p> <p>The existing solutions (that I could find) were unconvincing.</p> <p>I wanted to be able to search a very long tree (ul/li/ul...) that is displayed as one page; it contains 5000+ items.</p> <p>It sounds a little weird to display such a long tree on one page but in fact with collapse / expand it's much more intuitive than separate pages, and since we're offline, download times are not a problem (parsing times are, though, but Chrome is amazing ;-)</p> <p>The "search" function provided with modern browsers (FF and Chrome anyway) have two big problems: they only search visible items on the page, and they can't search non-consecutive words.</p> <p>I want to be able to search collapsed items (not visible on the screen); I want to find "one two three" when searching "one three" (just like with Google / Lucene); and I want to open just the branches of the tree containing found items.</p> <p>So, what I did was:</p> <ol> <li>create an inverted index of words &lt;-> ids of items from the list (via xslt) (approx. 4500 unique words in the document)</li> <li>convert this index to bunch of javascript arrays (one word = one array, containing ids)</li> <li>when searching, intersect the arrays represented by the search words</li> <li>step 3 returns an array of ids that I can then open / highlight</li> </ol> <p>It does exactly what I needed and it's really fast. Better yet, since it searches from an independant "index" (arrays of ids) it can search when the list is not even loaded in the browser!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload