org.apache.solr.client.solrj.request
Class UpdateRequest
java.lang.Object
org.apache.solr.client.solrj.SolrRequest
org.apache.solr.client.solrj.request.AbstractUpdateRequest
org.apache.solr.client.solrj.request.UpdateRequest
- All Implemented Interfaces:
- Serializable, IsUpdateRequest
public class UpdateRequest
- extends AbstractUpdateRequest
- Since:
- solr 1.3
- See Also:
- Serialized Form
Method Summary |
UpdateRequest |
add(Collection<SolrInputDocument> docs)
|
UpdateRequest |
add(SolrInputDocument doc)
|
UpdateRequest |
add(SolrInputDocument doc,
Boolean overwrite)
|
UpdateRequest |
add(SolrInputDocument doc,
Integer commitWithin)
|
UpdateRequest |
add(SolrInputDocument doc,
Integer commitWithin,
Boolean overwrite)
|
void |
clear()
clear the pending documents and delete commands |
UpdateRequest |
deleteById(List<String> ids)
|
UpdateRequest |
deleteById(String id)
|
UpdateRequest |
deleteById(String id,
Long version)
|
UpdateRequest |
deleteByQuery(String q)
|
Collection<ContentStream> |
getContentStreams()
|
List<String> |
getDeleteById()
|
Map<String,Map<String,Object>> |
getDeleteByIdMap()
|
List<String> |
getDeleteQuery()
|
Iterator<SolrInputDocument> |
getDocIterator()
|
List<SolrInputDocument> |
getDocuments()
|
Map<SolrInputDocument,Map<String,Object>> |
getDocumentsMap()
|
Map<String,LBHttpSolrServer.Req> |
getRoutes(DocRouter router,
DocCollection col,
Map<String,List<String>> urlMap,
ModifiableSolrParams params,
String idField)
|
String |
getXML()
|
void |
setDeleteQuery(List<String> deleteQuery)
|
void |
setDocIterator(Iterator<SolrInputDocument> docIterator)
|
void |
writeXML(Writer writer)
|
Methods inherited from class org.apache.solr.client.solrj.request.AbstractUpdateRequest |
getAction, getCommitWithin, getParams, isWaitSearcher, process, rollback, setAction, setAction, setAction, setAction, setAction, setAction, setCommitWithin, setParam, setParams, setWaitSearcher |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VER
public static final String VER
- See Also:
- Constant Field Values
OVERWRITE
public static final String OVERWRITE
- See Also:
- Constant Field Values
COMMIT_WITHIN
public static final String COMMIT_WITHIN
- See Also:
- Constant Field Values
UpdateRequest
public UpdateRequest()
UpdateRequest
public UpdateRequest(String url)
clear
public void clear()
- clear the pending documents and delete commands
add
public UpdateRequest add(SolrInputDocument doc)
add
public UpdateRequest add(SolrInputDocument doc,
Boolean overwrite)
add
public UpdateRequest add(SolrInputDocument doc,
Integer commitWithin)
add
public UpdateRequest add(SolrInputDocument doc,
Integer commitWithin,
Boolean overwrite)
add
public UpdateRequest add(Collection<SolrInputDocument> docs)
deleteById
public UpdateRequest deleteById(String id)
deleteById
public UpdateRequest deleteById(List<String> ids)
deleteById
public UpdateRequest deleteById(String id,
Long version)
deleteByQuery
public UpdateRequest deleteByQuery(String q)
getRoutes
public Map<String,LBHttpSolrServer.Req> getRoutes(DocRouter router,
DocCollection col,
Map<String,List<String>> urlMap,
ModifiableSolrParams params,
String idField)
- Parameters:
router
- to route updates withcol
- DocCollection for the updatesurlMap
- of the clusterparams
- params to useidField
- the id field
- Returns:
- a Map of urls to requests
setDocIterator
public void setDocIterator(Iterator<SolrInputDocument> docIterator)
setDeleteQuery
public void setDeleteQuery(List<String> deleteQuery)
getContentStreams
public Collection<ContentStream> getContentStreams()
throws IOException
- Specified by:
getContentStreams
in class SolrRequest
- Throws:
IOException
getXML
public String getXML()
throws IOException
- Throws:
IOException
writeXML
public void writeXML(Writer writer)
throws IOException
- Throws:
IOException
- Since:
- solr 1.4
getDocuments
public List<SolrInputDocument> getDocuments()
getDocumentsMap
public Map<SolrInputDocument,Map<String,Object>> getDocumentsMap()
getDocIterator
public Iterator<SolrInputDocument> getDocIterator()
getDeleteById
public List<String> getDeleteById()
getDeleteByIdMap
public Map<String,Map<String,Object>> getDeleteByIdMap()
getDeleteQuery
public List<String> getDeleteQuery()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.