ChemPal Documentation - v0.0.13-beta.5
    Preparing search index...

    Interface SearchHistoryEntry

    Interface defining the required properties for a history entry. Used to store the history of results that were clicked on.

    const historyEntry: HistoryEntry = {
    timestamp: Date.now(),
    type: "search",
    data: {
    suppliers: ["supplier1", "supplier2"],
    query: "sodium chloride",
    resultCount: 10
    }
    };
    interface SearchHistoryEntry {
        timestamp: number;
        type: "search";
        query: string;
        resultCount: number;
        filters?: SearchFilters;
        selectedSuppliers?: string[];
        data?: { suppliers: string[]; query: string; resultCount: number };
    }
    Index

    Properties

    timestamp: number

    Epoch ms timestamp of when the search was executed

    type: "search"
    query: string

    The search query string

    resultCount: number

    Number of results returned (updated live as results stream in)

    filters?: SearchFilters

    Pre-search filters that were active when this search was executed

    selectedSuppliers?: string[]

    Supplier keys that were selected when this search was executed

    data?: { suppliers: string[]; query: string; resultCount: number }