|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.util.SimplePostTool
public class SimplePostTool
A simple utility class for posting raw updates to a Solr server, has a main method so it can be run on the command line.
Field Summary | |
---|---|
static String |
DEFAULT_POST_URL
|
protected URL |
solrUrl
|
static String |
VERSION_OF_THIS_TOOL
|
Constructor Summary | |
---|---|
SimplePostTool(URL solrUrl)
Constructs an instance for posting data to the specified Solr URL (ie: "http://localhost:8983/solr/update") |
Method Summary | |
---|---|
void |
commit()
Does a simple commit operation |
void |
doGet(String url)
Performs a simple get on the given URL |
void |
doGet(URL url)
Performs a simple get on the given URL |
static void |
main(String[] args)
|
void |
optimize()
Does a simple optimize operation |
void |
postData(InputStream data,
Integer length,
OutputStream output)
Reads data from the data stream and posts it to solr, writes to the response to output |
void |
postFile(File file,
OutputStream output)
Opens the file and posts it's contents to the solrUrl, writes to response to output. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_POST_URL
public static final String VERSION_OF_THIS_TOOL
protected URL solrUrl
Constructor Detail |
---|
public SimplePostTool(URL solrUrl)
Method Detail |
---|
public static void main(String[] args)
public void commit()
public void optimize()
public void postFile(File file, OutputStream output)
UnsupportedEncodingException
public void doGet(String url)
url
- public void doGet(URL url)
url
- public void postData(InputStream data, Integer length, OutputStream output)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |