SolrTextTagger icon indicating copy to clipboard operation
SolrTextTagger copied to clipboard

Error while request tags: TaggerRequestHandler requires text to be POSTed to it

Open squallsama opened this issue 7 years ago • 1 comments
trafficstars

Even if I use QueryRequest with METHOD.POST I need to use deprecated override: @Override public Collection<ContentStream> getContentStreams() { return Collections.singleton((ContentStream) new ContentStreamBase .StringStream(input)); }

To get success with solr text tagger request handler.

In TaggerRequestHandler.java //--Get posted data Reader inputReader = null; Iterable<ContentStream> streams = req.getContentStreams();

Maybe it's better to support input string via parameters like overlaps - final String inputString = req.getParams().get(INPUT_STRING); ?

squallsama avatar Mar 15 '18 22:03 squallsama

Yes, it's fairly recent that getContentStreams was deprecated in favor of org.apache.solr.client.solrj.SolrRequest#getContentWriter. But it'll be around thru the 7.x series for back-compat reasons. You could send the stream.body param as an alternative.

dsmiley avatar Mar 16 '18 02:03 dsmiley