Node Details

  • Name: documentStore
  • Type: Document
  • Version: 1.0
  • Category: Document Loaders
  • Base Classes: Document

Input Parameters

  • Select Store (selectedStore):
    • Type: asyncOptions
    • Load Method: listStores
    • Description: Allows the user to select from a list of available document stores.

Outputs

  1. Document:

    • Name: document
    • Description: Array of document objects containing metadata and pageContent
    • Base Classes: Document, json
  2. Text:

    • Name: text
    • Description: Concatenated string from pageContent of documents
    • Base Classes: string, json

Functionality

  1. The node first retrieves a list of available document stores using the listStores method.
  2. Once a store is selected, it fetches all document chunks associated with that store from the database.
  3. It then processes these chunks into Document objects, including both the page content and metadata.
  4. Depending on the selected output type, it either:
    • Returns an array of Document objects
    • Concatenates the page content of all documents into a single string, handling escape characters

Usage

This node is particularly useful for:

  • Retrieving pre-processed and stored documents for further analysis or processing
  • Accessing document metadata along with content
  • Quickly obtaining the full text content of multiple documents in a single string

Technical Details

  • Utilizes TypeORM for database interactions
  • Implements the INode interface for compatibility with the larger system
  • Uses the Document class from LangChain for standardized document handling
  • Handles asynchronous operations for database queries and data processing

Note

The node requires a properly configured database connection (appDataSource) and correctly set up database entities to function properly.