Interesting. Searching is pretty snappy, case insensitive, but doesn't
ignore diacritical marks. The load time is comfortable for 627 entries and
it would be interesting to see how load times would be for larger sets.
This is a client-side index so index build performance is also dependent on
the client side processor, OS, and memory.

Here is an interesting anomaly: I searched on the year 1832 and got 2 hits,
one of them being year of "Wolfgang Goethe (1749-1832)". When I search on
the birth year (1749) I get 3 hits. As I wrote this and went back and forth
with it I noticed that it is likely being affected by the unicode character
"–" (u+0336) --- 1749-1832 versus 1749–1832--- but I'm not sure why.

I wonder how complicated it would be to normalize strings (ignore accents).

On Thu, Feb 16, 2017 at 8:57 PM, Paul <p...@paulwmorris.com> wrote:

> Hi all,
>
> I recently added a search feature to my Clairnote sheet music library[0]
> by using the javascript library lunr.js[1].  It does the search in the
> browser without any further interaction with the server after the initial
> page load.  It's nice because after the page loads, searches are almost
> instantaneous.
>
> This might be an interesting approach to explore for the Mutopia Project
> because the data to be searched is not really all that large.  Each record
> (i.e. work or piece) basically is only a handful of relatively short text
> fields.
>
> [0] http://clairnote.org/sheet-music-library/
>
> [1] http://lunrjs.com/
>
> Cheers,
> -Paul
>
>
>
> _______________________________________________
> Mutopia-discuss mailing list
> Mutopia-discuss@mutopiaproject.org
> http://lists.bcn.mythic-beasts.com/mailman/listinfo/mutopia-discuss
>
_______________________________________________
Mutopia-discuss mailing list
Mutopia-discuss@mutopiaproject.org
http://lists.bcn.mythic-beasts.com/mailman/listinfo/mutopia-discuss

Reply via email to