Document
note
💡 What is a Document?
- It is a unit of data that becomes the target of search.
- Equivalent to a row in RDBMS
- Equivalent to a document in NoSQL
warning
- For smooth searching, the
_id
andtitle
fields must be included.
Schema
_id
stringThe unique identifier of the Document. It must be a non-duplicate value.
title
stringThe title of the Document. It is displayed as the title in search results.
[other fields …]
anyThe remaining fields of the Document. They are used as user-defined fields in search results. The field names and types can be input through the Collection's mapping.
Mapping Type
text
stringA long string that is the target of search. Cannot use filters. Highlighting is possible. Can be input in array form.
example
{
"_id": "unique_document_id_123",
"title": "Description of Philip",
"content": "Philip is a software engineer at Toggle Campus. He is a full-stack developer. He is interested in machine learning and AI. He is a good team player. He is a good communicator. He is a good problem solver. He is a good leader. He is a good mentor. He is a good friend. He is a good husband. He is a good father. He is a good son. He is a good brother. He is a good person. He is a good...",
}
keyword
stringA short string that is the target of search. (maximum 50 characters) Can use filters. Highlighting is not possible. Can be input in array form. Supports string matching. Used when representing enum or category in data.
example
{
"_id": "unique_document_id_123",
"title": "Description of Philip",
"job": "Programmer",
}
number
numberRepresents a numeric value among the Document's fields. Can use filters. Allows null values. Converted to floating-point.
date
datetimeRepresents a date/time value among the Document's fields. Can use filters. Allows null values. Returns as a string in search results.
boolean
booleanRepresents a true/false value among the Document's fields. Can use filters. Allows null values.