Reputation: 5487
I have to work with Solr, which I'll use from another webapp to index and search documents.
I thought I could run an instance of it inside Eclipse, alongside my web application, but if I import the Solr war, Eclipse will unpack it in a web project.
Is there a way to keep it as a War and just have it deployer inside a Tomcat server instance (in the IDE)?
Or is there a better (easier) way to do what I want to do? Basically I want a running instance of Solr to which I can connect and operate from the web application I'm developing.
Upvotes: 3
Views: 3819
Reputation: 9500
We are keeping our Solr configurations together with the according war file within an Eclipse project. I will refer to this project as your project here
. That way we keep everything together in one place
What you need to do is
1) Create an empty tomcat server within eclipse
2) Add -Dsolr.solr.home=${resource_loc:/<your project here>/solr/home}
to the VM arguments of that tomcat
3) Add the solr war file as <Context>
to the server.xml of that tomcat
Upvotes: 3