Problem/Motivation

Boost factors have to be formatted regardless of the locale, always use a period, never a comma.

Steps to reproduce

sprintf('%.1f', $boost)

Proposed resolution

The problem is the sprintf with parameter "f" - "the argument is treated as a float and presented as a floating-point number (locale aware). "

On German Websites (locale=de_De) this leads to a boost_term "String|1,0" and this throws a error on the Solr server
-> possible analysis error: For input string: "5,​0"

We have to use the parameter '%.1F' instead

CommentFileSizeAuthor
#3 3216762.patch2.55 KBmkalkbrenner

Comments

mkalkbrenner created an issue. See original summary.

mkalkbrenner’s picture

mkalkbrenner’s picture

Status: Active » Needs review
StatusFileSize
new2.55 KB
mkalkbrenner’s picture

I already fixed the critical related issue in Search API Solr, so the parse error should not happen anymore.
But here we also have a major issue because the default of the selection boxes might be wrong and could silently change, when you save the processors!

drunken monkey’s picture

Status: Needs review » Fixed

Great catch, thanks a lot!
Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.