Skip to content

Commit 0770e1b

Browse files
author
Brad Noble
authored
Merge pull request #44 from ibm-cds-labs/arrayofstring-facet
arrayofstrings facet fails
2 parents d7c5ed2 + 1b68254 commit 0770e1b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/transform.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ var findfield = function(f, flist) {
1111
var x = function(doc, schema) {
1212
for(var i in doc) {
1313
var v = doc[i];
14-
i = i.replace(/\W/g,"_");
14+
/*
15+
commenting out the below because schema.fields contain the original
16+
field names (spaces are not replaces with underscores). facets end
17+
up not being handled properly when field is an 'arrayofstrings' and
18+
contains spaces in the title.
19+
*/
20+
// i = i.replace(/\W/g,"_");
1521
var f = findfield(i, schema.fields);
1622
if (f) {
1723
switch (f.type) {

0 commit comments

Comments
 (0)