public class SimplePostTool extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_POST_URL |
protected URL |
solrUrl |
static String |
VERSION_OF_THIS_TOOL |
| Constructor and Description |
|---|
SimplePostTool(URL solrUrl)
Constructs an instance for posting data to the specified Solr URL
(ie: "http://localhost:8983/solr/update")
|
| Modifier and Type | Method and Description |
|---|---|
static String |
appendParam(String url,
String param) |
void |
commit()
Does a simple commit operation
|
static void |
doGet(String url)
Performs a simple get on the given URL
|
static void |
doGet(URL url)
Performs a simple get on the given URL
|
String |
getFileTypes() |
boolean |
isAuto() |
boolean |
isRecursive() |
static void |
main(String[] args) |
void |
optimize()
Does a simple optimize operation
|
void |
postData(InputStream data,
Integer length,
OutputStream output,
String type) |
void |
postData(InputStream data,
Integer length,
OutputStream output,
String type,
URL url)
Reads data from the data stream and posts it to solr,
writes to the response to output
|
void |
postFile(File file,
OutputStream output,
String type)
Opens the file and posts it's contents to the solrUrl,
writes to response to output.
|
void |
setAuto(boolean auto) |
void |
setFileTypes(String fileTypes) |
void |
setRecursive(boolean recursive) |
static InputStream |
stringToStream(String s) |
public static final String DEFAULT_POST_URL
public static final String VERSION_OF_THIS_TOOL
protected URL solrUrl
public SimplePostTool(URL solrUrl)
public static void main(String[] args)
public void commit()
public void optimize()
public void postFile(File file, OutputStream output, String type)
public static void doGet(String url)
public static void doGet(URL url)
public void postData(InputStream data, Integer length, OutputStream output, String type)
public void postData(InputStream data, Integer length, OutputStream output, String type, URL url)
public static InputStream stringToStream(String s)
public boolean isAuto()
public void setAuto(boolean auto)
public boolean isRecursive()
public void setRecursive(boolean recursive)
public String getFileTypes()
public void setFileTypes(String fileTypes)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.