Search in sources :

Example 11 with ContentStreamUpdateRequest

use of org.apache.solr.client.solrj.request.ContentStreamUpdateRequest in project storm by apache.

the class SolrJsonMapper method createtSolrRequest.

private SolrRequest createtSolrRequest(String json) {
    final ContentStreamUpdateRequest request = new ContentStreamUpdateRequest(jsonUpdateUrl);
    final ContentStream cs = new ContentStreamBase.StringStream(json, CONTENT_TYPE);
    request.addContentStream(cs);
    if (logger.isDebugEnabled()) {
        logger.debug("Request generated with JSON: " + json);
    }
    return request;
}
Also used : ContentStream(org.apache.solr.common.util.ContentStream) ContentStreamUpdateRequest(org.apache.solr.client.solrj.request.ContentStreamUpdateRequest)

Aggregations

ContentStreamUpdateRequest (org.apache.solr.client.solrj.request.ContentStreamUpdateRequest)11 QueryResponse (org.apache.solr.client.solrj.response.QueryResponse)3 ContentStreamBase (org.apache.solr.common.util.ContentStreamBase)3 Test (org.junit.Test)3 File (java.io.File)2 ErrorTrackingConcurrentUpdateSolrClient (org.apache.solr.client.solrj.embedded.SolrExampleStreamingTest.ErrorTrackingConcurrentUpdateSolrClient)2 HttpSolrClient (org.apache.solr.client.solrj.impl.HttpSolrClient)2 SolrException (org.apache.solr.common.SolrException)2 ContentStream (org.apache.solr.common.util.ContentStream)2 BufferedInputStream (java.io.BufferedInputStream)1 FilenameFilter (java.io.FilenameFilter)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Map (java.util.Map)1 Random (java.util.Random)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 MimetypesFileTypeMap (javax.activation.MimetypesFileTypeMap)1 WrappedFile (org.apache.camel.WrappedFile)1