Skip to content

Commit

Permalink
Added text values
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Smyntyna authored and andreysmyntyna committed Jan 24, 2018
1 parent 4ef92e6 commit ff2c6d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,20 @@ this.Searcher = (function() {
var name = column.getName();
var join = column.getJoin();
var value = result.getValue(column);
var text = result.getText(column);
var joinTitle = join;

if (join) {
if(!(joinTitle in newResult.columns)) newResult.columns[joinTitle] = {};
newResult.columns[joinTitle][name] = value;
if(text && text !== value) {
newResult.columns[joinTitle][name + '.text'] = text;
}
} else {
newResult.columns[name] = value;
if(text && text !== value) {
newResult.columns[name + '.text'] = text;
}
}
}
newResultsBlock.push(newResult);
Expand Down

0 comments on commit ff2c6d9

Please sign in to comment.