I currently have a build system for my Solr index written in Perl. I am
in the process of rewriting it in Java. I've reached the part of the
project where I'm using SolrJ, and I have a bunch of questions. All of
the SolrJ examples I can find are too simple to answer them.
A note before I launch into the questions. The wiki page for SolrJ says
that a static instance of CommonsHttpSolrServer is recommended, but NONE
of the examples I have been able to find actually use it that way. I've
since learned that our webapp is creating a new object for every query.
I've brought it to the attention of our development team, they'll be
fixing it.
1) I can't find any examples of using CoreAdmin with SolrJ. There seems
to be a general lack of examples of doing anything complicated at all.
Can anyone point me at comprehensive and detailed examples of using
SolrJ that do everything in accordance with SolrJ recommendations?
2) When constructing and using HTTP requests that you make yourself, you
can use a POST request to issue a query. I use this method in my Perl
build system to check for the existence of a large quantity of
documents, and if any of them do exist, I use the same query to delete
those documents with another POST request. Can I do the same thing with
SolrJ, or is it limited to queries using GET requests only?
3) I'll need to access CoreAdmin as well as individual cores for
updates, queries, etc. The former uses a /solr/ URL, the latter
/solr/corename/. Will I need two CommonsHttpSolrServer instances to do
this, or is there a way to specify a core through a parameter?
I am sure that I have more questions, but I may be able to answer a lot
of them myself if I can see better examples.
Thanks,
Shawn
- Some questions about SolrJ Shawn Heisey
-