Skip to content

Commit

Permalink
refactor: remove index from message
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed May 25, 2020
1 parent 0011646 commit ecdbb12
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/campaign.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ const CampaignSchema = new Schema({
type: String,
trim: true,
required: true,
index: true,
searchable: true,
// index: true,
// searchable: true,
fake: { generator: 'lorem', type: 'sentence' },
},

Expand Down
4 changes: 2 additions & 2 deletions lib/message.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ const MessageSchema = new Schema(
body: {
type: String,
trim: true,
index: true,
searchable: true,
// index: true,
// searchable: true,
fake: {
generator: 'lorem',
type: 'sentence',
Expand Down
4 changes: 2 additions & 2 deletions test/unit/campaign.schema.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ describe('Campaign Schema', () => {
expect(message.options.type).to.be.a('function');
expect(message.options.type.name).to.be.equal('String');
expect(message.options.trim).to.be.true;
expect(message.options.index).to.be.true;
expect(message.options.searchable).to.be.true;
// expect(message.options.index).to.be.true;
// expect(message.options.searchable).to.be.true;
expect(message.options.fake).to.exist;
});

Expand Down
4 changes: 2 additions & 2 deletions test/unit/message.schema.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ describe('Message Schema', () => {
expect(body.options.type).to.be.a('function');
expect(body.options.type.name).to.be.equal('String');
expect(body.options.trim).to.be.true;
expect(body.options.index).to.be.true;
expect(body.options.searchable).to.be.true;
// expect(body.options.index).to.be.true;
// expect(body.options.searchable).to.be.true;
expect(body.options.fake).to.exist;
});

Expand Down

0 comments on commit ecdbb12

Please sign in to comment.