I have developed a web application(WAR) which is querying solr index on my localhost.
Is there a way to host my application where I am planning to host my WAR somewhere and which is capable of querying solr index which might be hosted somewhere else(or if there is any way to upload the index at the same place as WAR)?
Instead of hosting directly the index, I can upload my application as well which creates the index on solr.
Please suggest any alternative if my above understanding is wrong.
Thanks!
Solr and your application need not be hosted in the same server. You can very well host Solr separately and use it within your application.
Let's say you have two servers
server1.com
- hosts web applicationserver2.com
- hosts solr.You can have your host application query
http://server2.com:<port>/solr
for making requests to solr.If you do not want to host your own Solr instance, you can use a service such as WebSolr, which will take care of the hosting for you.
Edit 1:
Since you want a free hosting, I would recommend using something like OpenShift, which is a Platform-as-a-service provider and offer 3 small gears(instances) for free. You can setup Solr on one of the instances.
Here is one link that has some setup instruction for setting up Solr (note that the Solr version is outdated).
Alternatively, if you are not particular about Solr and can use Elasticsearch instead, I have an openshift cartridge that I use to setup my search instances.