 Search by substring on strings which map to id
<p>What would be the best way to implement search by substring on Strings(around 5000 entity names in application) which map to entityId. </p>

<p>I want to implement it so that I could put searched suggestions to the user as he types in one or more characters.For e.g I would want to be able to suggest all entities starting with his queried substring as he does the search.</p>

<p>Looking forward to store them in the application scope itself to avoid frequent retrievals from DB.</p>
