Skip to content

Instantly share code, notes, and snippets.

@MisterPea
Created June 28, 2020 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MisterPea/ed350b0b6fe66e097555e5cfe0f67617 to your computer and use it in GitHub Desktop.
Save MisterPea/ed350b0b6fe66e097555e5cfe0f67617 to your computer and use it in GitHub Desktop.
mongoose-fuzzy-output
Query {
_mongooseOptions: {},
_transforms: [],
_hooks: Kareem { _pres: Map(0) {}, _posts: Map(0) {} },
_executionCount: 0,
mongooseCollection: NativeCollection {
collection: null,
Promise: [Function: Promise],
_closed: false,
opts: {
bufferCommands: true,
capped: false,
autoCreate: undefined,
Promise: [Function: Promise],
'$wasForceClosed': undefined
},
name: 'users',
collectionName: 'users',
conn: NativeConnection {
base: [Mongoose],
collections: [Object],
models: [Object],
config: [Object],
replica: false,
options: null,
otherDbs: [],
relatedDbs: {},
states: [Object: null prototype],
_readyState: 0,
_closeCalled: false,
_hasOpened: false,
plugins: [],
id: 0,
_listening: false
},
queue: [],
buffer: true,
emitter: EventEmitter {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
[Symbol(kCapture)]: false
}
},
model: Model { User },
schema: Schema {
obj: {
firstName: [Function: String],
lastName: [Function: String],
email: [Function: String],
age: [Function: Number]
},
paths: {
firstName: [SchemaString],
lastName: [SchemaString],
email: [SchemaString],
age: [SchemaNumber],
_id: [ObjectId],
firstName_fuzzy: [SchemaArray],
lastName_fuzzy: [SchemaArray],
__v: [SchemaNumber]
},
aliases: {},
subpaths: {
'firstName_fuzzy.$': [SchemaString],
'lastName_fuzzy.$': [SchemaString]
},
virtuals: { id: [VirtualType] },
singleNestedPaths: {},
nested: {},
inherits: {},
callQueue: [],
_indexes: [ [Array] ],
methods: {},
methodOptions: {},
statics: { fuzzySearch: [Function (anonymous)] },
tree: {
firstName: [Function: String],
lastName: [Function: String],
email: [Function: String],
age: [Function: Number],
_id: [Object],
firstName_fuzzy: [Object],
lastName_fuzzy: [Object],
__v: [Function: Number],
id: [VirtualType]
},
query: {},
childSchemas: [],
plugins: [ [Object], [Object], [Object], [Object], [Object], [Object] ],
'$id': 1,
s: { hooks: [Kareem] },
_userProvidedOptions: {},
options: {
typePojoToMixed: true,
typeKey: 'type',
id: true,
noVirtualId: false,
_id: true,
noId: false,
validateBeforeSave: true,
read: null,
shardKey: null,
autoIndex: null,
minimize: true,
discriminatorKey: '__t',
versionKey: '__v',
capped: false,
bufferCommands: true,
strict: true,
toObject: [Object],
toJSON: [Object],
pluralization: true
},
'$globalPluginsApplied': true,
_requiredpaths: []
},
op: 'find',
options: { sort: { confidenceScore: [Object] } },
_conditions: { '$text': { '$search': 'oe jo joe' } },
_fields: { confidenceScore: { '$meta': 'textScore' } },
_update: undefined,
_path: undefined,
_distinct: undefined,
_collection: NodeCollection {
collection: NativeCollection {
collection: null,
Promise: [Function: Promise],
_closed: false,
opts: [Object],
name: 'users',
collectionName: 'users',
conn: [NativeConnection],
queue: [],
buffer: true,
emitter: [EventEmitter]
},
collectionName: 'users'
},
_traceFunction: undefined,
'$useProjection': true,
_userProvidedFields: { confidenceScore: { '$meta': 'textScore' } }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment