This is a simple REST application for searching phrases in the episodes' scripts of The Simpsons series. The application fetches scripts from a web page by parsing html markup. The application uses Lucene for creating the index of the scripts and Ratpack for creating simple web service.
To run the application use command:
./gradlew run
The server will be running on port 5050
http://localhost:5050/query?phrase=
For example, if you want to search for a phrase "hearing things", the request should look like this:
http://localhost:5050/query?phrase=hearing%20things
The endpoint returns list of URLs linking to pages whose scripts contain the searched phrase.
http://localhost:5050/remove-index
http://localhost:5050/create-index
This operating takes a while. Look at server logs to see information about indexing consecutive episodes.