RSS Feed/News Search sends a prefix-list as a hash and not an array to search subsystem

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,712
Points
823

Reputation:

If the c.prefixes query parameter has the value c[prefixes][10]=1&c[prefixes][11]=2, and XFES is installed, elasticsearch can throw something like "Elasticsearch error: [terms] query does not support [0] within lookup element".

This happens because of this code;
PHP:

Code:
		$prefixes = $request->filter('c.prefixes', 'array-uint');
		$prefixes = array_unique($prefixes);
		if ($prefixes && reset($prefixes))
		{
			$query->withMetadata('prefix', $prefixes);
		}
The line $prefixes =...

Read more

Continue reading...
 
Status
Not open for further replies.
Top