Skip to main content
Version: 1.0.0

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 and title 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
string
  • A 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
    string
  • A 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
    number
  • Represents a numeric value among the Document's fields.
  • Can use filters.
  • Allows null values.
  • Converted to floating-point.

  • date
    datetime
  • Represents a date/time value among the Document's fields.
  • Can use filters.
  • Allows null values.
  • Returns as a string in search results.

  • boolean
    boolean
  • Represents a true/false value among the Document's fields.
  • Can use filters.
  • Allows null values.