Simple spring and maven based web application to index and search domains.
- Clone this repository
- Run
mvn clean install
- Download tomcat runtime
- Copy war file(DomainSearchApp.war) from target folder to webapps of tomcat installation dir
- Start tomcat
- Go to http://localhost:8080/DomainSearchApp/search.html
- type in three or more chars for autocomplete to show up
- Click on submit.
- If single result is returned it would open in new tab (make sure popups are enabled for localhost)
- If multiple results are returned it would be displayed below search field. Each result is an hyperlink.
- pom.xml - Has all maven dependencies required by the project like spring, gson etc
- WebContent/WEB-INF/web.xml - Web application configuration goes here
- WebContent/WEB-INF/domainsearcher-servlet.xml - Dispacher servlet configuration goes here
- WebContent/WEB-INF/JSP/search.jsp - Single jsp page with text field that supports auto complete
- src/com/domainsearch/controller/SearchDomain.java - controller for spring application
- src/com/domainsearch/index/DomainIndexer.java - Indexer service that interacts between controller and actual index impl
- src/com/domainsearch/index/Trie.java - Actual indexing implementation
- src/top-1m.csv - domains data set
- Project needs to be deployed on a tomcat container
- Project uses Java/JSP/Jquery/Javascript/HTML
- Indexing implementation does not handle all chars. It just handles chars/numbers and a .
- API to fetch matched domain results is not authenticated
- UI can be made better with frameworks like bootstrap
- Results returned by API can be paginated to avoid latency due to large result set returns