0

I have about 500 text files (around 6 MB overall) i need to use as resources in my windows phone application.

My application is searching for a string given by the user in the resources and returns the files containing the string to be displayed to the user.

I´m looking for the right way to do this kind of search, i have 3 ideas:

  1. Iterate the files on every search, use String.Contains to find the given string.
  2. Pre-load the files to the memory, iterate them on every search (it is in memory but takes around 6 MB).
  3. Use some kind of a local document db (any ideas?) to index the files for a textual search.
dagoltz
  • 62
  • 7
  • This would likely be much better done on a server with an actual full text engine and passing back results. Your app won't have the resources to do a proper full text search I would imagine (I would suspect you'll encounter out of memory exceptions). A contains type search will give you the absolute basic type text search only. I'm not sure if it's compatible, but have a look at Lucene for .NET. – WiredPrairie Mar 30 '14 at 12:55
  • Thanks! we chose not to implement a server side for this app, it most be a standalone version with no need for internet – dagoltz Mar 30 '14 at 21:20

1 Answers1

0

My suggestion is you can use the local database SQLite, this is a sample.

Alen Lee
  • 2,479
  • 2
  • 21
  • 30