forms-angular 0.12.0-beta.353 → 0.12.0-beta.354
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/data_form.js +4 -2
- package/package.json +1 -1
package/dist/server/data_form.js
CHANGED
|
@@ -551,13 +551,15 @@ export class FormsAngular {
|
|
|
551
551
|
function recordMatches(resultObject, aDoc, item) {
|
|
552
552
|
const before = calcAddHits(resultObject);
|
|
553
553
|
const charsBefore = matchedChars(resultObject);
|
|
554
|
+
// A resource can opt out of the exact match bonus, so its exact matches never jump above resources of greater importance
|
|
555
|
+
const exactBonus = item.resource.options.searchExactBonus !== false;
|
|
554
556
|
resultObject.matched = resultObject.matched || [];
|
|
555
557
|
if (item.combined) {
|
|
556
558
|
if (multiMatchPossible) {
|
|
557
559
|
resultObject.matched = searchStrings.map((word, i) => i);
|
|
558
560
|
}
|
|
559
561
|
else {
|
|
560
|
-
resultObject.exact =
|
|
562
|
+
resultObject.exact = exactBonus;
|
|
561
563
|
}
|
|
562
564
|
}
|
|
563
565
|
else {
|
|
@@ -584,7 +586,7 @@ export class FormsAngular {
|
|
|
584
586
|
}
|
|
585
587
|
}
|
|
586
588
|
else if (fieldValue === searchFor) {
|
|
587
|
-
resultObject.exact =
|
|
589
|
+
resultObject.exact = exactBonus;
|
|
588
590
|
}
|
|
589
591
|
}
|
|
590
592
|
}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"description": "A form builder that sits on top of Angular.js, Twitter Bootstrap, jQuery UI, Angular-UI, Express and Mongoose. Opinionated or what?",
|
|
8
8
|
"homepage": "http://forms-angular.org",
|
|
9
|
-
"version": "0.12.0-beta.
|
|
9
|
+
"version": "0.12.0-beta.354",
|
|
10
10
|
"packageManager": "npm@10.2.4",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"engines": {
|