lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Sending binary data as part of a query
Date Tue, 01 Feb 2011 02:22:04 GMT

: I have successfully created a QueryComponent class that, assuming it
: has the integer bitset, can turn that into the necessary DocSetFilter
: to pass to the searcher, get back the facets, etc. That part all works
: What I'm unsure how to do is actually send this compressed bitset from
: a client to solr as part of the query. From what I can tell, the Solr
: API classes that are involved in handling binary data as part of a
: request assume that the data is a document to be added. For instance,
: extending ContentStreamHandlerBase requires implementing some kind of
: document loader and an UpdateRequestProcessorChain and a bunch of

that class should probably have been named ContentStreamUpdateHandlerBase 
or something like that -- it tries to encapsulate the logic that most 
RequestHandlers using COntentStreams (for updating) need to worry about.

Your QueryComponent (as used by SearchHandler) should be able to access 
the ContentStreams the same way that class does ... call 

Sending a binary stream from a remote client depends on how the client is 
implemented -- you can do it via HTTP using the POST body (with or w/o 
multi-part mime) in any langauge you want. If you are using SolrJ you may 
again run into an assumption that using ContentStreams means you are doing 
an "Update" but that's just a vernacular thing ... something like a 
ContentStreamUpdateRequest should work just as well for a query (as long 
as you set the neccessary params and/or request handler path)


View raw message