fix(db): fix replace values func with new manticore
This commit is contained in:
parent
156786b41c
commit
f1119b5516
@ -136,13 +136,19 @@ const expand = (sphinx) => {
|
|||||||
{
|
{
|
||||||
for(const k in sphinxIndex)
|
for(const k in sphinxIndex)
|
||||||
{
|
{
|
||||||
|
// sphinx index can output as lower case like feedIndex -> feedindex, so don't dublicate index
|
||||||
|
// in this case
|
||||||
|
let k_index = k;
|
||||||
|
const lowerK = k.toLowerCase();
|
||||||
|
if (typeof values[lowerK] != 'undefined')
|
||||||
|
k_index = lowerK;
|
||||||
if(typeof sphinxIndex[k] === 'string')
|
if(typeof sphinxIndex[k] === 'string')
|
||||||
{
|
{
|
||||||
values[k] = values[sphinxIndex[k]]
|
values[k_index] = values[sphinxIndex[k]]
|
||||||
}
|
}
|
||||||
else if (typeof sphinxIndex[k] === 'function')
|
else if (typeof sphinxIndex[k] === 'function')
|
||||||
{
|
{
|
||||||
values[k] = sphinxIndex[k](values)
|
values[k_index] = sphinxIndex[k](values)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user