Integrate solr with spring application
How can I integrate solr in my spring and struts application. Is it an overkill for small a开发者_C百科pplications as I am just developing a college project
Sumit what exactly are your requirements? As you can always do a small POC and i have answered in other post Solr is an standalone enterprise search server so it does not matter to it if you are using Spring,Struts,Wicket or any other framework. All it needs the data sources from where it needs to collect data for indexing be it your database,file system or any other data over web. It has some out of the box data-handlers which knows how to handle and read/parse data from the source you have configured,when you ask Solr to give data against the search it will hand over the data to you as per your search criteria and now its in your hands how you use the data and use it.
i hope this will help you in understanding the concept.
You can use EmbeddedSolr to fully integrate Solr into your webapp. You won't need to deploy any extra WARs, just the one for your webapp.
This will fire up Solr within your app and let you access it directly. The nice thing about this is that the interface is exactly the same as accessing it via HTTP to a standalone server, meaning if you change your mind later on it will only be a single line change
精彩评论