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:
parent
eb3bebf20d
commit
f825e9fdc9
9 changed files with 82 additions and 54 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue