1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 23:59:47 +02:00

Improved full text search matching

This commit is contained in:
sauls8t 2018-03-19 15:04:02 +00:00
parent eb3bebf20d
commit f825e9fdc9
9 changed files with 82 additions and 54 deletions

View file

@ -12,21 +12,18 @@
import Component from '@ember/component';
export default Component.extend({
resultPhrase: "",
init() {
this._super(...arguments);
this.results = [];
},
resultPhrase: '',
didReceiveAttrs() {
this._super(...arguments);
let docs = this.get('results');
let duped = [];
let phrase = 'Nothing found';
if (docs.length > 0) {
duped = _.uniq(docs, function (item) {
return item.documentId;
return item.get('documentId');
});
let references = docs.length === 1 ? "reference" : "references";