PDF conversion and Storing

I want to store PDF, word documents in DB as JSON format or any Querry searchable format. So that i can Fetch Documents using running word query (for eg) with keywords in a sorted format?