What's the algorithm of an unclear search better for 10,000 lines of 50 symbols?



  • There's a 10000-string array. Average length of line 50 symbols.

    Symbols in line: a-я0-9'"%+!& .,;\-()/

    The search is carried out on the client by JavaScript. Now use a simple matching search using indexOf. What algorithm would be best?



  • From the user commentary https://ru.stackoverflow.com/users/194908/pink-tux :

    Choose algorithm, search for implementation on JS (some of which are easy to write, for example, Levenstein distance), test. Everything depends on input data, including the design of the search base, the length of words and so on.

    We can read the article. http://habrahabr.ru/post/114997 " .




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2