My answer begins with the definition of What does elegant mean?
There are such solutions as: -
- Create a calculated column in the database [FirstName] + N '' + [Surname] + N '' + [SecondName], etc. Then you only need
OR substrings based on the computed column. Is it elegant / more productive? I'm not sure. - Create a
FREETEXTABLE For more information, see MSDN . Again you only need OR for each substring (based on SQL Server FULL-TEXT sarch). - Embed LUCENE index in all columns, see this . However, you need to trace the synchronization problems with the database, and you will also need to study the new structure, but the search is definitely IMO more elegant.
- Stay with what you have.
What you decide is up to you, but 1-3 have different problems against what you currently have, which Iām not elegant, but it just and most likely works!
Rippo source share