# Decorator Text

Decorator mongoose property
Module
import { Text } from "@tsed/mongoose"
Source/packages/mongoose/src/decorators/text.ts

# Overview

function Text(text?: boolean | number | any): PropertyDecorator;

# Description

If truthy (opens new window), Mongoose will build a text index on this path.

# Example

@Model()
export class EventModel {
  @Text()
  field: string;
}
1
2
3
4
5

Other topics