Class ModifiedUpdateRequest

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.solr.client.solrj.request.IsUpdateRequest

    public class ModifiedUpdateRequest
    extends org.apache.solr.client.solrj.request.AbstractUpdateRequest
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.solr.client.solrj.request.AbstractUpdateRequest

        org.apache.solr.client.solrj.request.AbstractUpdateRequest.ACTION
      • Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest

        org.apache.solr.client.solrj.SolrRequest.METHOD, org.apache.solr.client.solrj.SolrRequest.SolrClientContext, org.apache.solr.client.solrj.SolrRequest.SolrRequestType
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String COMMIT_WITHIN  
      static java.lang.String OVERWRITE  
      static java.lang.String REPFACT  
      static java.lang.String VER  
      • Fields inherited from class org.apache.solr.client.solrj.request.AbstractUpdateRequest

        commitWithin, params
      • Fields inherited from class org.apache.solr.client.solrj.SolrRequest

        SUPPORTED_METHODS, useBinaryV2, usev2
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ModifiedUpdateRequest add​(java.lang.String... fields)  
      ModifiedUpdateRequest add​(java.util.Collection<org.apache.solr.common.SolrInputDocument> docs)
      Add a collection of SolrInputDocuments to this request
      ModifiedUpdateRequest add​(org.apache.solr.common.SolrInputDocument doc)
      Add a SolrInputDocument to this request
      ModifiedUpdateRequest add​(org.apache.solr.common.SolrInputDocument doc, java.lang.Boolean overwrite)
      Add a SolrInputDocument to this request
      ModifiedUpdateRequest add​(org.apache.solr.common.SolrInputDocument doc, java.lang.Integer commitWithin)
      Add a SolrInputDocument to this request
      ModifiedUpdateRequest add​(org.apache.solr.common.SolrInputDocument doc, java.lang.Integer commitWithin, java.lang.Boolean overwrite)
      Add a SolrInputDocument to this request
      void clear()
      clear the pending documents and delete commands
      org.apache.solr.client.solrj.response.UpdateResponse commit​(org.apache.solr.client.solrj.SolrClient client, java.lang.String collection)  
      ModifiedUpdateRequest deleteById​(java.lang.String id)  
      ModifiedUpdateRequest deleteById​(java.lang.String id, java.lang.Long version)  
      ModifiedUpdateRequest deleteById​(java.lang.String id, java.lang.String route)  
      ModifiedUpdateRequest deleteById​(java.lang.String id, java.lang.String route, java.lang.Long version)  
      ModifiedUpdateRequest deleteById​(java.util.List<java.lang.String> ids)  
      ModifiedUpdateRequest deleteByQuery​(java.lang.String q)  
      java.util.Collection<org.apache.solr.common.util.ContentStream> getContentStreams()  
      java.util.List<java.lang.String> getDeleteById()  
      java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.Object>> getDeleteByIdMap()  
      java.util.List<java.lang.String> getDeleteQuery()  
      java.util.Iterator<org.apache.solr.common.SolrInputDocument> getDocIterator()  
      java.util.List<org.apache.solr.common.SolrInputDocument> getDocuments()  
      java.util.Map<org.apache.solr.common.SolrInputDocument,​java.util.Map<java.lang.String,​java.lang.Object>> getDocumentsMap()  
      java.util.Map<java.lang.String,​ModifiedLBSolrClient.Req> getRoutesToCollection​(org.apache.solr.common.cloud.DocRouter router, org.apache.solr.common.cloud.DocCollection col, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> urlMap, org.apache.solr.common.params.ModifiableSolrParams params, java.lang.String idField)  
      java.lang.String getXML()  
      boolean isLastDocInBatch()  
      void lastDocInBatch()  
      void setDeleteQuery​(java.util.List<java.lang.String> deleteQuery)  
      void setDocIterator​(java.util.Iterator<org.apache.solr.common.SolrInputDocument> docIterator)  
      ModifiedUpdateRequest withRoute​(java.lang.String route)  
      ModifiedUpdateRequest writeXML​(java.io.Writer writer)  
      • Methods inherited from class org.apache.solr.client.solrj.request.AbstractUpdateRequest

        createResponse, getAction, getCommitWithin, getParams, getRequestType, isWaitSearcher, rollback, setAction, setAction, setAction, setAction, setAction, setAction, setAction, setCommitWithin, setParam, setParams, setWaitSearcher
      • Methods inherited from class org.apache.solr.client.solrj.SolrRequest

        addHeader, getBasePath, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentWriter, getHeaders, getMethod, getPath, getPreferredNodes, getQueryParams, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, setBasePath, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setResponseParser, setStreamingResponseCallback, setUseBinaryV2, setUserPrincipal, setUseV2
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ModifiedUpdateRequest

        public ModifiedUpdateRequest()
      • ModifiedUpdateRequest

        public ModifiedUpdateRequest​(java.lang.String url)
    • Method Detail

      • clear

        public void clear()
        clear the pending documents and delete commands
      • add

        public ModifiedUpdateRequest add​(org.apache.solr.common.SolrInputDocument doc)
        Add a SolrInputDocument to this request
        Throws:
        java.lang.NullPointerException - if the document is null
      • add

        public ModifiedUpdateRequest add​(org.apache.solr.common.SolrInputDocument doc,
                                         java.lang.Boolean overwrite)
        Add a SolrInputDocument to this request
        Parameters:
        doc - the document
        overwrite - true if the document should overwrite existing docs with the same id
        Throws:
        java.lang.NullPointerException - if the document is null
      • add

        public ModifiedUpdateRequest add​(org.apache.solr.common.SolrInputDocument doc,
                                         java.lang.Integer commitWithin)
        Add a SolrInputDocument to this request
        Parameters:
        doc - the document
        commitWithin - the time horizon by which the document should be committed (in ms)
        Throws:
        java.lang.NullPointerException - if the document is null
      • add

        public ModifiedUpdateRequest add​(org.apache.solr.common.SolrInputDocument doc,
                                         java.lang.Integer commitWithin,
                                         java.lang.Boolean overwrite)
        Add a SolrInputDocument to this request
        Parameters:
        doc - the document
        commitWithin - the time horizon by which the document should be committed (in ms)
        overwrite - true if the document should overwrite existing docs with the same id
        Throws:
        java.lang.NullPointerException - if the document is null
      • add

        public ModifiedUpdateRequest add​(java.util.Collection<org.apache.solr.common.SolrInputDocument> docs)
        Add a collection of SolrInputDocuments to this request
        Throws:
        java.lang.NullPointerException - if any of the documents in the collection are null
      • deleteById

        public ModifiedUpdateRequest deleteById​(java.lang.String id,
                                                java.lang.String route,
                                                java.lang.Long version)
      • commit

        public org.apache.solr.client.solrj.response.UpdateResponse commit​(org.apache.solr.client.solrj.SolrClient client,
                                                                           java.lang.String collection)
                                                                    throws java.io.IOException,
                                                                           org.apache.solr.client.solrj.SolrServerException
        Throws:
        java.io.IOException
        org.apache.solr.client.solrj.SolrServerException
      • getRoutesToCollection

        public java.util.Map<java.lang.String,​ModifiedLBSolrClient.Req> getRoutesToCollection​(org.apache.solr.common.cloud.DocRouter router,
                                                                                                    org.apache.solr.common.cloud.DocCollection col,
                                                                                                    java.util.Map<java.lang.String,​java.util.List<java.lang.String>> urlMap,
                                                                                                    org.apache.solr.common.params.ModifiableSolrParams params,
                                                                                                    java.lang.String idField)
        Parameters:
        router - to route updates with
        col - DocCollection for the updates
        urlMap - of the cluster
        params - params to use
        idField - the id field
        Returns:
        a Map of urls to requests
      • setDocIterator

        public void setDocIterator​(java.util.Iterator<org.apache.solr.common.SolrInputDocument> docIterator)
      • setDeleteQuery

        public void setDeleteQuery​(java.util.List<java.lang.String> deleteQuery)
      • getContentStreams

        public java.util.Collection<org.apache.solr.common.util.ContentStream> getContentStreams()
                                                                                          throws java.io.IOException
        Overrides:
        getContentStreams in class org.apache.solr.client.solrj.SolrRequest<org.apache.solr.client.solrj.response.UpdateResponse>
        Throws:
        java.io.IOException
      • getXML

        public java.lang.String getXML()
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • writeXML

        public ModifiedUpdateRequest writeXML​(java.io.Writer writer)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
        Since:
        solr 1.4
      • getDocuments

        public java.util.List<org.apache.solr.common.SolrInputDocument> getDocuments()
      • getDocumentsMap

        public java.util.Map<org.apache.solr.common.SolrInputDocument,​java.util.Map<java.lang.String,​java.lang.Object>> getDocumentsMap()
      • getDocIterator

        public java.util.Iterator<org.apache.solr.common.SolrInputDocument> getDocIterator()
      • getDeleteById

        public java.util.List<java.lang.String> getDeleteById()
      • getDeleteByIdMap

        public java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.Object>> getDeleteByIdMap()
      • getDeleteQuery

        public java.util.List<java.lang.String> getDeleteQuery()
      • isLastDocInBatch

        public boolean isLastDocInBatch()
      • lastDocInBatch

        public void lastDocInBatch()