Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
squallsama opened this issue Mar 15, 2018 · 1 comment
Labels

Comments

@squallsama
Copy link

squallsama commented Mar 15, 2018

Even if I use QueryRequest with METHOD.POST I need to use deprecated override:
@OverRide
public Collection 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 streams = req.getContentStreams();

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

@dsmiley
Copy link
Member

dsmiley commented Mar 16, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants