0.0.16 • Published 1 year ago

@tobiklee/open-search-sdk v0.0.16

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

open search sdk

minimalistic open search sdk

This is actively developed and not production ready. Use at your own risk.

example

import { Client, SearchCommand } from '@tobiklee/open-search-sdk';

const search = async () => {
	// replace values
    const id = '<awsAccessKeyId>';
    const key = '<awsSecretAccessKey>';
    const endpoint = '<url>';

    const client = new Client({
        endpoint,
		// remove or change options
        fetchOptions: {
            signOptions: {
                region: 'eu-central-1',
                accessKeyId: id,
                secretAccessKey: key,
                service: 'es',
            },
        },
    });
    try {
        const response = await client.execute(new SearchCommand({
            index: '<indexName>',
            query: {
                match: {
                    fieldName: '<value>',
                },
            },
        }));
        console.info('response', response);
    } catch (e) {
        console.error('request failed', JSON.stringify(e, null, 2));
    }
};

search();
0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago