[jira] [Commented] (SOLR-7913) Add stream.body support to MLT QParser

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (SOLR-7913) Add stream.body support to MLT QParser

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SOLR-7913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646715#comment-16646715 ]

Isabelle Giguere commented on SOLR-7913:

Solr 7.5.0:

Since Solr 7.1, requestParsers param enableStreamBody allows control over stream.body support, but stream.body still cannot be used with the MLT Qparser.  Current behavior insists on looking for a doc id.

SOLR-7913_tag_7.5.0.patch :
Clean patch to allow stream.body im MLT QParser (no trace of SOLR-8604 as previously)
Patch based on revision 61870, tag 7.5.0, latest release

New class org.apache.solr.client.solrj.request.ContentStreamQueryRequest should override SolrRequest.getContentWriter(String) instead of SolrRequest.getContentStreams()

Changes in org.apache.solr.request.json.RequestUtil allow stream.body on an MLT Qparser request, but test TestRemoteStreaming.testNoUrlAccess fails (meaning the test query doesn't fail), so is ignored for now.
There should be a better fix, that would consider MLT QParser, Json requests, and still pass test TestRemoteStreaming.testNoUrlAccess
- Set a contentType on MLT QParser requests with stream.body, and check for that contentType along with "/json" in RequestUtil ?
- Require param 'json' on all Json requests ?  Meaning the query at line 178 in TestJsonRequest.doJsonRequest(Client, boolean) would not be allowed

There could be a more streamlined solution, closer to how requestParsers param enableStreamBody is supported elsewhere in the code.

> Add stream.body support to MLT QParser
> --------------------------------------
>                 Key: SOLR-7913
>                 URL: https://issues.apache.org/jira/browse/SOLR-7913
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Anshum Gupta
>            Priority: Major
>         Attachments: SOLR-7913.patch, SOLR-7913.patch, SOLR-7913.patch, SOLR-7913_fixTests.patch, SOLR-7913_tag_7.5.0.patch
> Continuing from https://issues.apache.org/jira/browse/SOLR-7639?focusedCommentId=14601011&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14601011.
> It'd be good to have stream.body be supported by the mlt qparser.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]