1

Is there any way to access EmbeddedSolrServer from outside current JVM? For example, to update indexes or review index stats (Luke is good tool, but I'd like to use something web-based).

jdevelop
  • 12,176
  • 10
  • 56
  • 112

1 Answers1

1

EmbeddedSolrServer is not meant to be used like that. Furthermore, its use is not recommended anymore:

The simplest, safest, way to use Solr is via Solr's standard HTTP interfaces. Embedding Solr is less flexible, harder to support, not as well tested, and should be reserved for special circumstances.

You can just run a HttpSolrServer against your index and access to it through http. Otherwise you can analyze your index using a specific lucene based tool, like the one (Luke) you already mentioned.

javanna
  • 59,145
  • 14
  • 144
  • 125
  • The page you linked also said, **" the Solrj Java API provides an EmbeddedSolrServer implementation. This is the recommended way to "embed" Solr into a Java application. It provides the exact same API as you would use if you were connecting to a remote Solr instance -- which makes it easy to convert later if you'd like; and by using it you can be sure you will be Using API calls that will be supported in the future."**. Your answer is not very clear at this & may definitely misguide people. – Rajat Gupta Oct 01 '13 at 06:49
  • @user01 if you have a better answer than mine you can post it. – javanna Oct 01 '13 at 13:27
  • Nope, I don't have an answer to this & I am still not sure what's the recommended way or what's not recommended because the linked page itself creates confusion about *which `EmbeddedSolrServer` is recommended* & *which `EmbeddedSolrServer` is not recommended*. I 'm myself looking for a clarification on this.. – Rajat Gupta Oct 01 '13 at 13:31
  • @user01 I agree, it is not really clear. What I got in the past, at the time I answered, was not to use it, or use it only for development purposes but not on production. But to be honest I haven't been playing around with Solr for quite some time now, things might have changed, that's why I suggested to add information or a better answer if there is one. – javanna Oct 01 '13 at 15:44
  • Infact I did asked a question about this[http://stackoverflow.com/q/19110022/530153] today but didn't recieved very satisfactory responses. I'll try seeking guidance through the official mailing list or IRC channel. – Rajat Gupta Oct 01 '13 at 15:53