Skip to content

Commit

Permalink
Try alt index
Browse files Browse the repository at this point in the history
* This is one of the last recommendations that mLabs said to try.
* Also paired with re-investigation mentioned at OpenUserJS#1825 (comment)
  • Loading branch information
Martii committed Jan 7, 2022
1 parent eed5dc2 commit 7d8c99f
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions models/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,20 @@ var scriptSchema = new Schema({
scriptSchema.index({
isLib: 1, // A lot of hits
author: 1, // Some hits
name: 1 // Very few hits
// about: 'text' // No hits period when included... only one allowed per Schema
}); // NOTE: Array indexing isn't supported with *mongoose* (yet?)
name: 1, // Very few hits
_about: 1,
_description: 1,
'meta.UserScript.include.value': 1
});

scriptSchema.index({
isLib: 1, // A lot of hits
author: 1, // Some hits
name: 1, // Very few hits
_about: 1,
_description: 1,
'meta.UserScript.match.value': 1
});


/*
Expand Down

0 comments on commit 7d8c99f

Please sign in to comment.