Hi Christine,

Thank you for testing it out. Yes it should be a straightforward fix. I'll
open a ticket then.

Best,

Yue

On Tue, Mar 26, 2024 at 4:50 AM Christine Poerschke (BLOOMBERG/ LONDON) <
cpoersc...@bloomberg.net> wrote:

> Hello Yue,
>
> I'm not familiar with this part of the code but wanted to share that
> changing the Http2SolrClient.java code locally on main branch like this
>
> - Fields fields = new Fields();
> + Fields fields = new Fields(true);
>
> does pass tests when run locally. Though perhaps that could be due to lack
> of test coverage similar to the f.case_sensitive_field.facet.limit=5 &
> f.CASE_SENSITIVE_FIELD.facet.limit=99 usage you mention.
>
> Hope that helps.
>
> Christine
>
> From: users@solr.apache.org At: 03/25/24 16:09:15 UTCTo:
> users@solr.apache.org
> Subject: solr9.5.0/solrj9.5.0 bugs in shard request
>
> Hello,
>
> I found an issue in solr9.5.0/solrj9.5.0 regarding shard requests:
> As of now, the multi-shard requests are sent through Http2SolrClient, and
> this function composes the actual Jetty Request object:
>
> > private Request fillContentStream( Request req, Collection<ContentStream>
> > streams, ModifiableSolrParams wparams, boolean isMultipart) throws
> > IOException { if (isMultipart) { // multipart/form-data try
> > (MultiPartRequestContent content = new MultiPartRequestContent()) {
> > Iterator<String> iter = wparams.getParameterNamesIterator(); while
> > (iter.hasNext()) { String key = iter.next(); String[] vals =
> > wparams.getParams(key); if (vals != null) { for (String val : vals) {
> > content.addFieldPart(key, new StringRequestContent(val), null); } } } if
> > (streams != null) { for (ContentStream contentStream : streams) { String
> > contentType = contentStream.getContentType(); if (contentType == null) {
> > contentType = "multipart/form-data"; // default } String name =
> > contentStream.getName(); if (name == null) { name = ""; }
> > HttpFields.Mutable fields = HttpFields.build(1);
> > fields.add(HttpHeader.CONTENT_TYPE, contentType); content.addFilePart(
> > name, contentStream.getName(), new
> > InputStreamRequestContent(contentStream.getStream()), fields); } }
> > req.body(content); } } else { // application/x-www-form-urlencoded Fields
> > fields = new Fields(); Iterator<String> iter =
> > wparams.getParameterNamesIterator(); while (iter.hasNext()) { String key
> =
> > iter.next(); String[] vals = wparams.getParams(key); if (vals != null) {
> > for (String val : vals) { fields.add(key, val); } } } req.body(new
> > FormRequestContent(fields, FALLBACK_CHARSET)); } return req; }
> >
> The problem is the use of this class *Fields fields = new Fields(); * where
> caseSensitive=false by default, this leads to case sensitive solr params
> being merged together. For example f.case_sensitive_field.facet.limit=5 &
> f.CASE_SENSITIVE_FIELD.facet.limit=99
>
> Not sure if this is intentional for some reason?
>
> Best,
>
> Yue
>
>
>

Reply via email to