I want to use NLP with elasticsearch. I have been able to achieve one level by using Open NLP plugin as mentioned in comments of this question. I am getting entities like person
, organization
, location
etc indexed while inserting documents.
I have a doubt while searching the same information.Since, I need to process the terms entered by the user during query time. Following is what I have thought of:
Process the query entered by user using apache NLP as specified here.
Extract Person, location and organisation Names from the previous and then run a query against the entities stored in index.
- I am also thinking of using Google Knowledge Graph Search Api to fetch related information about the extracted entities in the previous steps and then include them in search query as well. (Reason to do this is because we want to show results of
Delhi
in case some one searches forCapital Of India
). We are not going with Synonyms Search approach in this case as we want the information to be dynamically available.
My question is that- Is there something better we can do to achieve the same, because lot of processing at query time is going to increase the response time?