Skip to content

Commit

Permalink
add info for typesense usage for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTango committed Nov 10, 2023
1 parent 753b64c commit 2bb016c
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions connector_typesense/readme/TYPESENSE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
typesense
~~~~~~~~~

requirements: to pretty print json, install jq on your system;


in terminal export the API key

.. code-block::
export TYPESENSE_API_KEY='xyz'
export TYPESENSE_HOST='http://localhost:8108'
list all collections (indexes):

.. code-block::
curl -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
"http://localhost:8108/collections" | jq
retrieve collection details of the products collection (index):

.. code-block::
curl -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
-X GET "http://localhost:8108/collections/products" | jq
list aliases:

.. code-block::
curl -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
"http://localhost:8108/aliases" | jq
get alias info:

.. code-block::
curl -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
"http://localhost:8108/aliases/products" | jq
search for all products:

curl -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
"http://localhost:8108/collections/products/documents/search?q=*" | jq

0 comments on commit 2bb016c

Please sign in to comment.