CINXE.COM

Vector Search API - Morph Blog

<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="image" href="/assets/blog/2023/vectorsearch.png"/><link rel="preload" as="image" href="/assets/blog/2023/SimilaritySearch_setupA1.jpeg"/><link rel="preload" as="image" href="/assets/blog/2023/SimilaritySearch_setupA2.jpeg"/><link rel="preload" as="image" href="/assets/blog/2023/SimilaritySearch_setupB1.jpeg"/><link rel="preload" as="image" href="/assets/blog/2023/SimilaritySearch_setupB2.jpeg"/><link rel="preload" as="image" href="/assets/blog/2023/SimilaritySearch_setupC1.jpeg"/><link rel="preload" as="image" href="/assets/blog/2023/SimilaritySearch_setupC2.jpeg"/><link rel="preload" as="image" href="/assets/blog/2023/SimilaritySearch_D_Example2.jpeg"/><link rel="stylesheet" href="/_next/static/css/2aafeea248cede9a.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/fddcadcb43c27471.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/df58b362c76677f9.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-d0682dbbb946c48b.js"/><script src="/_next/static/chunks/fd9d1056-16ea8fe38a7128bb.js" async=""></script><script src="/_next/static/chunks/7023-f4d731cab88fb54c.js" async=""></script><script src="/_next/static/chunks/main-app-881f01dbe13267cd.js" async=""></script><script src="/_next/static/chunks/8173-114e2eeaae9e6aa9.js" async=""></script><script src="/_next/static/chunks/5813-46de9cb53c5263b9.js" async=""></script><script src="/_next/static/chunks/231-264d60bf1d424be4.js" async=""></script><script src="/_next/static/chunks/8471-e989399c86506ac9.js" async=""></script><script src="/_next/static/chunks/7482-7b5e507e010202f6.js" async=""></script><script src="/_next/static/chunks/4642-6a1ecf50e071d787.js" async=""></script><script src="/_next/static/chunks/260-7a31c570f80ecb45.js" async=""></script><script src="/_next/static/chunks/app/layout-79717b45130e28f3.js" async=""></script><script src="/_next/static/chunks/2482-1a2bdbb7910b89d3.js" async=""></script><script src="/_next/static/chunks/1051-5dd35963d58226c4.js" async=""></script><script src="/_next/static/chunks/1450-dc842fcb97d2f785.js" async=""></script><script src="/_next/static/chunks/app/page-0a098a0fe7def471.js" async=""></script><script src="/_next/static/chunks/2630-3c42b776210aaa43.js" async=""></script><script src="/_next/static/chunks/app/blog/template-152ffeacefd01572.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-S8YRCL4JQW" as="script"/><title>Vector Search API - Morph Blog</title><meta name="description" content="Searching in Morph with PostgreSQL"/><meta property="og:title" content="Vector Search API"/><meta property="og:description" content="Searching in Morph with PostgreSQL"/><meta property="og:url" content="https://www.morph-data.io/blog/2023/introducing-similarity-search-api"/><meta property="og:site_name" content="Morph"/><meta property="og:image" content="https://www.morph-data.io/assets/blog/2023/vectorsearch.png"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Vector Search API"/><meta name="twitter:description" content="Searching in Morph with PostgreSQL"/><meta name="twitter:image" content="https://www.morph-data.io/assets/blog/2023/vectorsearch.png"/><link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="48x48"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__className_d65c78 z-0 relative"><!--$--><!--/$--><script>!function(){try{var d=document.documentElement,c=d.classList;c.remove('light','dark');var e=localStorage.getItem('theme');if('system'===e||(!e&&true)){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){d.style.colorScheme = 'dark';c.add('dark')}else{d.style.colorScheme = 'light';c.add('light')}}else if(e){c.add(e|| '')}if(e==='light'||e==='dark')d.style.colorScheme=e}catch(e){}}()</script><div data-is-root-theme="true" data-accent-color="gray" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="medium" data-scaling="100%" class="radix-themes"><header class="sticky top-0 z-50 py-2 bg-white/60 dark:bg-black/60 backdrop-blur"><div class="hidden lg:flex justify-between items-center container mx-auto w-full py-1 gap-2"><a href="/"><img alt="Morph" loading="lazy" width="173" height="32" decoding="async" data-nimg="1" class="inline-block dark:hidden cursor-pointer" style="color:transparent" src="/assets/morph_logo.svg"/><img alt="Morph" loading="lazy" width="173" height="32" decoding="async" data-nimg="1" class="dark:inline-block hidden cursor-pointer" style="color:transparent" src="/assets/morph_logo_white.svg"/></a><div class="flex-1"></div><div class="flex items-center cursor-pointer text-black dark:text-white bg-transparent hover:bg-black/[0.1] dark:hover:bg-white/[0.1] transition-all font-normal px-4 py-2 rounded-md" type="button" id="radix-:Rqqba:" aria-haspopup="menu" aria-expanded="false" data-state="closed">Features<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down"><path d="m6 9 6 6 6-6"></path></svg></div><a class="mr-4" href="/blogs"><button data-accent-color="" class="rt-reset rt-BaseButton rt-r-size-3 rt-variant-solid rt-Button cursor-pointer text-black dark:text-white bg-transparent hover:bg-black/[0.1] dark:hover:bg-white/[0.1] transition-all font-normal">Blog</button></a><a href="https://docs.morph-data.io/docs/en" target="_blank"><button data-accent-color="" class="rt-reset rt-BaseButton rt-r-size-3 rt-variant-solid rt-Button cursor-pointer text-black dark:text-white bg-transparent hover:bg-black/[0.1] dark:hover:bg-white/[0.1] transition-all font-normal">Docs</button></a><a class="mr-4" href="/pricing"><button data-accent-color="" class="rt-reset rt-BaseButton rt-r-size-3 rt-variant-solid rt-Button cursor-pointer text-black dark:text-white bg-transparent hover:bg-black/[0.1] dark:hover:bg-white/[0.1] transition-all font-normal">Pricing</button></a><a href="https://app.morph-data.io/"><button data-accent-color="orange" class="rt-reset rt-BaseButton rt-r-size-3 rt-variant-solid rt-Button">Start for free</button></a><a href="/form/contact" target="_blank"><button data-accent-color="orange" class="rt-reset rt-BaseButton rt-r-size-3 rt-variant-outline rt-Button font-normal cursor-pointer">Talk to Sales</button></a><button data-accent-color="" type="button" id="radix-:R2aqba:" aria-haspopup="menu" aria-expanded="false" data-state="closed" class="rt-reset rt-BaseButton rt-r-size-4 rt-variant-ghost rt-IconButton text-black dark:text-white hover:bg-black/[0.1] transition-all font-normal cursor-pointer mx-1"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-globe"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg></button></div><div class="flex lg:hidden items-center w-full py-1 px-3"><div class="flex lg:hidden items-center items-center w-full"><a href="/"><img alt="Morph" loading="lazy" width="173" height="32" decoding="async" data-nimg="1" class="inline-block dark:hidden cursor-pointer" style="color:transparent" src="/assets/morph_logo.svg"/><img alt="Morph" loading="lazy" width="173" height="32" decoding="async" data-nimg="1" class="dark:inline-block hidden cursor-pointer" style="color:transparent" src="/assets/morph_logo_white.svg"/></a><div class="flex-1"></div><button data-accent-color="" type="button" id="radix-:Rsqba:" aria-haspopup="menu" aria-expanded="false" data-state="closed" class="rt-reset rt-BaseButton rt-r-size-3 rt-variant-ghost rt-IconButton ml-3 text-black dark:text-white hover:bg-black/[0.1] transition-all font-normal cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu"><line x1="4" x2="20" y1="12" y2="12"></line><line x1="4" x2="20" y1="6" y2="6"></line><line x1="4" x2="20" y1="18" y2="18"></line></svg></button></div></div><hr class="absolute w-full bottom-0 transition-opacity duration-300 ease-in-out opacity-0"/></header><main class=""><div class="p-4 lg:p-0 container mx-auto"><section class="p-6 lg:p-10 rounded-xl flex flex-col gap-6 items-center mb-10 "><article class="prose dark:prose-invert max-w-[960px] mb-[40px]"><h1>Introducing Morph&#x27;s Vector Search API: Unveiling Powerful Search Capabilities Built on PostgreSQL</h1> <p><img src="/assets/blog/2023/vectorsearch.png" alt="hero image"/></p> <h2>What is the Vector Search API?</h2> <h3>Vector Search</h3> <p>Vector Search, in contrast to conventional searches dependent on keyword matching, operates on the principle of similarity in vector space. This distinctive approach facilitates a more nuanced and context-aware exploration of data. Users can transcend the limitations of exact matches and delve into discovering items with similar meanings or relationships. The merit of Vector Search is prominently showcased in its capacity to deliver highly accurate and relevant results, rooted in a profound understanding of the inherent relationships between data points. Embark on a revolutionary search experience with the precision and context offered by Vector Search technology. ‍</p> <h3>Morph’s Vector Search Function</h3> <p>Morph&#x27;s Vector Search API is a robust tool that enables users to conduct effective vector searches. This functionality proves crucial in machine learning and data analysis, with applications spanning a variety of use cases. ‍</p> <h2>Setup</h2> <p>To leverage Morph&#x27;s Vector Search API, the following steps are required:</p> <ol> <li><strong>Registration for Team Plan:</strong> To initiate the use of the Vector Search API, you must register for the Team Plan. Currently you can get <strong>a two-week free trial period</strong> of the <strong>Team plan</strong> to test it out.‍</li> <li><strong>Creating the API and Embedding via the Interface:</strong> Configure the Vector Search API by creating embeddings directly through the user interface. This facilitates the straightforward preparation of data for vector searches.</li> </ol> <p><img src="/assets/blog/2023/SimilaritySearch_setupA1.jpeg" alt="Similarity Search"/> <img src="/assets/blog/2023/SimilaritySearch_setupA2.jpeg" alt="Similarity Search"/></p> <p>Enabling Similarity Search:</p> <ol> <li>Create Source from Left Side Bar</li> <li>Click “Similarity Search”</li> <li>Click “Activate” button on where you want to setup vector search</li> </ol> <p><img src="/assets/blog/2023/SimilaritySearch_setupB1.jpeg" alt="Similarity Search"/> <img src="/assets/blog/2023/SimilaritySearch_setupB2.jpeg" alt="Similarity Search"/></p> <h2>Developing API communication</h2> <p>To utilize the Vector Search API, integration with the API is necessary. The integration process is straightforward, allowing for easy implementation while referring to the documentation. This ensures a smooth and efficient search experience. ‍</p> <h3>Creating Data API:</h3> <ol> <li>Click the button +Create &gt; Data API &gt; Query API</li> <li>Copy YOUR TEAM NAME for later use</li> <li>Copy YOUR API KEY for later use</li> <li>You can see API Reference from <a href="https://api-docs.morphdb.io/reference/post-widget-data-record-query">HERE</a></li> </ol> <p><img src="/assets/blog/2023/SimilaritySearch_setupC1.jpeg" alt="Similarity Search"/> <img src="/assets/blog/2023/SimilaritySearch_setupC2.jpeg" alt="Similarity Search"/></p> <h2>Start Developing via API</h2> <p>In this sample code, we&#x27;ll be using our proprietary SDK, <strong>@morphdb/morph-client</strong>. However, it&#x27;s worth noting that our solution is not limited to just VanillaJS; it also seamlessly integrates with various other languages. For more details, please refer to the curl commands and <a href="https://api-docs.morphdb.io/reference/post-widget-data-record-query">API Reference</a>.</p> <h3>Javascript Example:</h3> <p><strong>Shell</strong></p> <p><strong>TypeScript</strong></p> <h3>About Embedding Operator Info</h3> <p>There are 3 types of operator used in Vector Search API. Here are the list of Embedding Operators:</p> <ul> <li><code>&lt;-&gt;</code> : L2 Distance</li> <li><code>&lt;=&gt;</code> : cosine similarity</li> <li><code>&lt;#&gt;</code> : inner product For more information, please check the link bellow: <a href="https://neon.tech/blog/understanding-vector-search-and-hnsw-index-with-pgvector">https://neon.tech/blog/understanding-vector-search-and-hnsw-index-with-pgvector</a> ‍ A sample coded output would look like this:</li> </ul> <p><img src="/assets/blog/2023/SimilaritySearch_D_Example2.jpeg" alt="Similarity Search"/></p> <h2>Use Cases</h2> <p>The Vector Search API boasts various use cases, but two, in particular, stand out:</p> <ul> <li>Semantic Search:Going beyond mere text, this feature allows searches based on meaning and concepts resulting in more precise search outcomes.</li> <li>Backend for RAG:Acting as the backend for Retrieval-Augmented Generation (RAG), it provides excellent search functionality for machine-generated content. For more about RAG,  please check the link below: <a href="https://research.ibm.com/blog/retrieval-augmented-generation-RAG">https://research.ibm.com/blog/retrieval-augmented-generation-RAG</a> ‍</li> </ul> <h2>Summary</h2> <p>Morph&#x27;s Vector Search API, with pgvector integrated into Neon, facilitates easy access to fully managed Vector Search based on PostgreSQL. ‍ Key advantages include:</p> <ul> <li>Being PostgreSQL-based, it allows for flexible and advanced searches when combined with filtering and sorting.</li> <li>Real-time updates of embeddings when editing source data via the interface, enabling swift and effective adaptation to changes.</li> </ul> <p>Morph provides an ideal solution for users with advanced search requirement</p></article></section><section class="p-6 lg:p-10 rounded-xl flex flex-col gap-6 items-center mb-10 "></section></div></main><footer class="bg-black text-white py-4 min-h-80"><div class="rt-Container rt-r-size-4 p-8"><div class="rt-ContainerInner"><div class="grid grid-cols-1 lg:grid-cols-3 w-full gap-8"><div class="flex flex-col gap-4"><img alt="Morph" loading="lazy" width="173" height="32" decoding="async" data-nimg="1" style="color:transparent" src="/assets/morph_logo_white.svg"/><a class="text-sm text-[var(--slate-9)] hover:text-white hover:underline my-1" href="/terms-of-service">Terms of Service</a><a class="text-sm text-[var(--slate-9)] hover:text-white hover:underline my-1" href="/privacy-policy">Privacy Policy</a></div><div class="flex flex-col gap-4"><a class="text-[var(--slate-9)] hover:text-white hover:underline" target="" href="/blogs">Blog</a><a class="text-[var(--slate-9)] hover:text-white hover:underline" target="_blank" href="https://docs.morph-data.io/docs/en">Docs</a><a class="text-[var(--slate-9)] hover:text-white hover:underline" target="" href="/pricing">Pricing</a></div><div class="flex flex-col gap-4"><div class="rt-Flex w-full py-1"><a rel="noopener noreferrer" target="_blank" href="https://twitter.com/morphdbHQ"><img alt="Morph" loading="lazy" width="25" height="25" decoding="async" data-nimg="1" class="inline-block cursor-pointer mr-3" style="color:transparent" srcSet="/_next/image?url=%2Fassets%2Fx-white-logo.png&amp;w=32&amp;q=75 1x, /_next/image?url=%2Fassets%2Fx-white-logo.png&amp;w=64&amp;q=75 2x" src="/_next/image?url=%2Fassets%2Fx-white-logo.png&amp;w=64&amp;q=75"/></a><a rel="noopener noreferrer" target="_blank" href="https://discord.gg/8ZcSbDrN6e"><img alt="Morph" loading="lazy" width="25" height="25" decoding="async" data-nimg="1" class="inline-block cursor-pointer mr-4" style="color:transparent" srcSet="/_next/image?url=%2Fassets%2Fdiscord-white-icon.png&amp;w=32&amp;q=75 1x, /_next/image?url=%2Fassets%2Fdiscord-white-icon.png&amp;w=64&amp;q=75 2x" src="/_next/image?url=%2Fassets%2Fdiscord-white-icon.png&amp;w=64&amp;q=75"/></a><a rel="noopener noreferrer" target="_blank" href="https://www.linkedin.com/company/morphdb/about/"><img alt="Morph" loading="lazy" width="25" height="25" decoding="async" data-nimg="1" class="inline-block cursor-pointer" style="color:transparent" srcSet="/_next/image?url=%2Fassets%2Flinkedin-app-white-icon.png&amp;w=32&amp;q=75 1x, /_next/image?url=%2Fassets%2Flinkedin-app-white-icon.png&amp;w=64&amp;q=75 2x" src="/_next/image?url=%2Fassets%2Flinkedin-app-white-icon.png&amp;w=64&amp;q=75"/></a></div><div class="flex-1"></div><p class="text-[var(--slate-9)] text-sm">© 2024 Morph. All rights reserved.</p></div></div></div></div></footer></div><script src="/_next/static/chunks/webpack-d0682dbbb946c48b.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/a34f9d1faa5f3315-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/2aafeea248cede9a.css\",\"style\"]\n3:HL[\"/_next/static/css/fddcadcb43c27471.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[5751,[],\"\"]\n6:I[9275,[],\"\"]\n7:I[1343,[],\"\"]\n9:I[8701,[\"8173\",\"static/chunks/8173-114e2eeaae9e6aa9.js\",\"5813\",\"static/chunks/5813-46de9cb53c5263b9.js\",\"231\",\"static/chunks/231-264d60bf1d424be4.js\",\"8471\",\"static/chunks/8471-e989399c86506ac9.js\",\"7482\",\"static/chunks/7482-7b5e507e010202f6.js\",\"4642\",\"static/chunks/4642-6a1ecf50e071d787.js\",\"260\",\"static/chunks/260-7a31c570f80ecb45.js\",\"3185\",\"static/chunks/app/layout-79717b45130e28f3.js\"],\"AmplitudeContextProvider\"]\na:\"$Sreact.suspense\"\nb:I[241,[\"8173\",\"static/chunks/8173-114e2eeaae9e6aa9.js\",\"5813\",\"static/chunks/5813-46de9cb53c5263b9.js\",\"231\",\"static/chunks/231-264d60bf1d424be4.js\",\"8471\",\"static/chunks/8471-e989399c86506ac9.js\",\"7482\",\"static/chunks/7482-7b5e507e010202f6.js\",\"4642\",\"static/chunks/4642-6a1ecf50e071d787.js\",\"260\",\"static/chunks/260-7a31c570f80ecb45.js\",\"3185\",\"static/chunks/app/layout-79717b45130e28f3.js\"],\"GlobalEventTracking\"]\nc:I[9512,[\"8173\",\"static/chunks/8173-114e2eeaae9e6aa9.js\",\"5813\",\"static/chunks/5813-46de9cb53c5263b9.js\",\"231\",\"static/chunks/231-264d60bf1d424be4.js\",\"8471\",\"static/chunks/8471-e989399c86506ac9.js\",\"7482\",\"static/chunks/7482-7b5e507e010202f6.js\",\"4642\",\"static/chunks/4642-6a1ecf50e071d787.js\",\"260\",\"static/chunks/260-7a31c570f80ecb45.js\",\"3185\",\"static/chunks/app/layout-79717b45130e28f3.js\"],\"ThemeProvider\"]\nd:I[9340,[\"8173\",\"static/chunks/8173-114e2eeaae9e6aa9.js\",\"5813\",\"static/chunks/5813-46de9cb53c5263b9.js\",\"2482\",\"static/chunks/2482-1a2bdbb7910b89d3.js\",\"4642\",\"static/chunks/4642-6a1ecf50e071d787.js\",\"1051\",\"static/chunks/1051-5dd35963d58226c4.js\",\"1450\",\"static/chunks/1450-dc842fcb97d2f785.js\",\"1931\",\"static/chunks/app/page-0a098a0fe7def471.js\"],\"Theme\"]\ne:I[658,[\"8173\",\"static/chunks/8173-114e2eeaae9e6aa9.js\",\"5813\",\"static/chunks/5813-46de9cb53c5263b9.js\",\"231\",\"static/chunks/231-264d60bf1d424be4.js\",\"8471\",\"static/chunks/8471-e989399c86506ac9.js\",\"7482\",\"static/chunks/7482-7b5e507e010202f6.js\",\"4642\",\"static/chunks/4642-6a1ecf50e071d787.js\",\"260\",\"static/chunks/260-7a31c570f80ecb45.js\",\"3185\",\"static/chunk"])</script><script>self.__next_f.push([1,"s/app/layout-79717b45130e28f3.js\"],\"RootHeader2\"]\nf:I[8173,[\"8173\",\"static/chunks/8173-114e2eeaae9e6aa9.js\",\"5813\",\"static/chunks/5813-46de9cb53c5263b9.js\",\"2482\",\"static/chunks/2482-1a2bdbb7910b89d3.js\",\"4642\",\"static/chunks/4642-6a1ecf50e071d787.js\",\"1051\",\"static/chunks/1051-5dd35963d58226c4.js\",\"1450\",\"static/chunks/1450-dc842fcb97d2f785.js\",\"1931\",\"static/chunks/app/page-0a098a0fe7def471.js\"],\"Image\"]\n10:I[231,[\"8173\",\"static/chunks/8173-114e2eeaae9e6aa9.js\",\"5813\",\"static/chunks/5813-46de9cb53c5263b9.js\",\"231\",\"static/chunks/231-264d60bf1d424be4.js\",\"8471\",\"static/chunks/8471-e989399c86506ac9.js\",\"7482\",\"static/chunks/7482-7b5e507e010202f6.js\",\"4642\",\"static/chunks/4642-6a1ecf50e071d787.js\",\"260\",\"static/chunks/260-7a31c570f80ecb45.js\",\"3185\",\"static/chunks/app/layout-79717b45130e28f3.js\"],\"\"]\n11:I[1164,[\"8173\",\"static/chunks/8173-114e2eeaae9e6aa9.js\",\"5813\",\"static/chunks/5813-46de9cb53c5263b9.js\",\"231\",\"static/chunks/231-264d60bf1d424be4.js\",\"8471\",\"static/chunks/8471-e989399c86506ac9.js\",\"7482\",\"static/chunks/7482-7b5e507e010202f6.js\",\"4642\",\"static/chunks/4642-6a1ecf50e071d787.js\",\"260\",\"static/chunks/260-7a31c570f80ecb45.js\",\"3185\",\"static/chunks/app/layout-79717b45130e28f3.js\"],\"Analytics\"]\n12:I[4404,[\"8173\",\"static/chunks/8173-114e2eeaae9e6aa9.js\",\"5813\",\"static/chunks/5813-46de9cb53c5263b9.js\",\"231\",\"static/chunks/231-264d60bf1d424be4.js\",\"8471\",\"static/chunks/8471-e989399c86506ac9.js\",\"7482\",\"static/chunks/7482-7b5e507e010202f6.js\",\"4642\",\"static/chunks/4642-6a1ecf50e071d787.js\",\"260\",\"static/chunks/260-7a31c570f80ecb45.js\",\"3185\",\"static/chunks/app/layout-79717b45130e28f3.js\"],\"GoogleAnalytics\"]\n14:I[6130,[],\"\"]\n15:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2aafeea248cede9a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/fddcadcb43c27471.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"e-6y4Ay_A3y2A3CgN_DEV\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/blog/2023/introducing-similarity-search-api\",\"initialTree\":[\"\",{\"children\":[\"blog\",{\"children\":[\"2023\",{\"children\":[\"introducing-similarity-search-api\",{\"children\":[\"__PAGE__\",{}]}]}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"blog\",{\"children\":[\"2023\",{\"children\":[\"introducing-similarity-search-api\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[[\"$\",\"h1\",null,{\"children\":\"Introducing Morph's Vector Search API: Unveiling Powerful Search Capabilities Built on PostgreSQL\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"$\",\"img\",null,{\"src\":\"/assets/blog/2023/vectorsearch.png\",\"alt\":\"hero image\"}]}],\"\\n\",[\"$\",\"h2\",null,{\"children\":\"What is the Vector Search API?\"}],\"\\n\",[\"$\",\"h3\",null,{\"children\":\"Vector Search\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Vector Search, in contrast to conventional searches dependent on keyword matching, operates on the principle of similarity in vector space. This distinctive approach facilitates a more nuanced and context-aware exploration of data. Users can transcend the limitations of exact matches and delve into discovering items with similar meanings or relationships. The merit of Vector Search is prominently showcased in its capacity to deliver highly accurate and relevant results, rooted in a profound understanding of the inherent relationships between data points. Embark on a revolutionary search experience with the precision and context offered by Vector Search technology.\\n‍\"}],\"\\n\",[\"$\",\"h3\",null,{\"children\":\"Morph’s Vector Search Function\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Morph's Vector Search API is a robust tool that enables users to conduct effective vector searches. This functionality proves crucial in machine learning and data analysis, with applications spanning a variety of use cases.\\n‍\"}],\"\\n\",[\"$\",\"h2\",null,{\"children\":\"Setup\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"To leverage Morph's Vector Search API, the following steps are required:\"}],\"\\n\",[\"$\",\"ol\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"strong\",null,{\"children\":\"Registration for Team Plan:\"}],\" To initiate the use of the Vector Search API, you must register for the Team Plan. Currently you can get \",[\"$\",\"strong\",null,{\"children\":\"a two-week free trial period\"}],\" of the \",[\"$\",\"strong\",null,{\"children\":\"Team plan\"}],\" to test it out.‍\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"strong\",null,{\"children\":\"Creating the API and Embedding via the Interface:\"}],\" Configure the Vector Search API by creating embeddings directly through the user interface. This facilitates the straightforward preparation of data for vector searches.\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[[\"$\",\"img\",null,{\"src\":\"/assets/blog/2023/SimilaritySearch_setupA1.jpeg\",\"alt\":\"Similarity Search\"}],\"\\n\",[\"$\",\"img\",null,{\"src\":\"/assets/blog/2023/SimilaritySearch_setupA2.jpeg\",\"alt\":\"Similarity Search\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Enabling Similarity Search:\"}],\"\\n\",[\"$\",\"ol\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":\"Create Source from Left Side Bar\"}],\"\\n\",[\"$\",\"li\",null,{\"children\":\"Click “Similarity Search”\"}],\"\\n\",[\"$\",\"li\",null,{\"children\":\"Click “Activate” button on where you want to setup vector search\"}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[[\"$\",\"img\",null,{\"src\":\"/assets/blog/2023/SimilaritySearch_setupB1.jpeg\",\"alt\":\"Similarity Search\"}],\"\\n\",[\"$\",\"img\",null,{\"src\":\"/assets/blog/2023/SimilaritySearch_setupB2.jpeg\",\"alt\":\"Similarity Search\"}]]}],\"\\n\",[\"$\",\"h2\",null,{\"children\":\"Developing API communication\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"To utilize the Vector Search API, integration with the API is necessary. The integration process is straightforward, allowing for easy implementation while referring to the documentation. This ensures a smooth and efficient search experience.\\n‍\"}],\"\\n\",[\"$\",\"h3\",null,{\"children\":\"Creating Data API:\"}],\"\\n\",[\"$\",\"ol\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":\"Click the button +Create \u003e Data API \u003e Query API\"}],\"\\n\",[\"$\",\"li\",null,{\"children\":\"Copy YOUR TEAM NAME for later use\"}],\"\\n\",[\"$\",\"li\",null,{\"children\":\"Copy YOUR API KEY for later use\"}],\"\\n\",[\"$\",\"li\",null,{\"children\":[\"You can see API Reference from \",[\"$\",\"a\",null,{\"href\":\"https://api-docs.morphdb.io/reference/post-widget-data-record-query\",\"children\":\"HERE\"}]]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[[\"$\",\"img\",null,{\"src\":\"/assets/blog/2023/SimilaritySearch_setupC1.jpeg\",\"alt\":\"Similarity Search\"}],\"\\n\",[\"$\",\"img\",null,{\"src\":\"/assets/blog/2023/SimilaritySearch_setupC2.jpeg\",\"alt\":\"Similarity Search\"}]]}],\"\\n\",[\"$\",\"h2\",null,{\"children\":\"Start Developing via API\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"In this sample code, we'll be using our proprietary SDK, \",[\"$\",\"strong\",null,{\"children\":\"@morphdb/morph-client\"}],\". However, it's worth noting that our solution is not limited to just VanillaJS; it also seamlessly integrates with various other languages. For more details, please refer to the curl commands and \",[\"$\",\"a\",null,{\"href\":\"https://api-docs.morphdb.io/reference/post-widget-data-record-query\",\"children\":\"API Reference\"}],\".\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":\"Javascript Example:\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"$\",\"strong\",null,{\"children\":\"Shell\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"$\",\"strong\",null,{\"children\":\"TypeScript\"}]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":\"About Embedding Operator Info\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"There are 3 types of operator used in Vector Search API. Here are the list of Embedding Operators:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"code\",null,{\"children\":\"\u003c-\u003e\"}],\" : L2 Distance\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"code\",null,{\"children\":\"\u003c=\u003e\"}],\" : cosine similarity\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"code\",null,{\"children\":\"\u003c#\u003e\"}],\" : inner product\\nFor more information, please check the link bellow:\\n\",[\"$\",\"a\",null,{\"href\":\"https://neon.tech/blog/understanding-vector-search-and-hnsw-index-with-pgvector\",\"children\":\"https://neon.tech/blog/understanding-vector-search-and-hnsw-index-with-pgvector\"}],\"\\n‍\\nA sample coded output would look like this:\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"$\",\"img\",null,{\"src\":\"/assets/blog/2023/SimilaritySearch_D_Example2.jpeg\",\"alt\":\"Similarity Search\"}]}],\"\\n\",[\"$\",\"h2\",null,{\"children\":\"Use Cases\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"The Vector Search API boasts various use cases, but two, in particular, stand out:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":\"Semantic Search:Going beyond mere text, this feature allows searches based on meaning and concepts resulting in more precise search outcomes.\"}],\"\\n\",[\"$\",\"li\",null,{\"children\":[\"Backend for RAG:Acting as the backend for Retrieval-Augmented Generation (RAG), it provides excellent search functionality for machine-generated content.\\nFor more about RAG,  please check the link below:\\n\",[\"$\",\"a\",null,{\"href\":\"https://research.ibm.com/blog/retrieval-augmented-generation-RAG\",\"children\":\"https://research.ibm.com/blog/retrieval-augmented-generation-RAG\"}],\"\\n‍\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h2\",null,{\"children\":\"Summary\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Morph's Vector Search API, with pgvector integrated into Neon, facilitates easy access to fully managed Vector Search based on PostgreSQL.\\n‍\\nKey advantages include:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":\"Being PostgreSQL-based, it allows for flexible and advanced searches when combined with filtering and sorting.\"}],\"\\n\",[\"$\",\"li\",null,{\"children\":\"Real-time updates of embeddings when editing source data via the interface, enabling swift and effective adaptation to changes.\"}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Morph provides an ideal solution for users with advanced search requirement\"}]]],null],null]},[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"blog\",\"children\",\"2023\",\"children\",\"introducing-similarity-search-api\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"blog\",\"children\",\"2023\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[\"$L8\",null],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_d65c78 z-0 relative\",\"children\":[[\"$\",\"$L9\",null,{\"children\":[[\"$\",\"$a\",null,{\"children\":[\"$\",\"$Lb\",null,{}]}],[\"$\",\"$Lc\",null,{\"attribute\":\"class\",\"children\":[\"$\",\"$Ld\",null,{\"accentColor\":\"gray\",\"grayColor\":\"slate\",\"children\":[[\"$\",\"$Le\",null,{}],[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}],[\"$\",\"footer\",null,{\"className\":\"bg-black text-white py-4 min-h-80\",\"children\":[\"$\",\"div\",null,{\"style\":\"$undefined\",\"className\":\"rt-Container rt-r-size-4 p-8\",\"children\":[\"$\",\"div\",null,{\"className\":\"rt-ContainerInner\",\"style\":\"$undefined\",\"children\":[\"$\",\"div\",null,{\"className\":\"grid grid-cols-1 lg:grid-cols-3 w-full gap-8\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex flex-col gap-4\",\"children\":[[\"$\",\"$Lf\",null,{\"src\":\"/assets/morph_logo_white.svg\",\"height\":32,\"width\":173,\"alt\":\"Morph\"}],[\"$\",\"$L10\",null,{\"href\":\"/terms-of-service\",\"className\":\"text-sm text-[var(--slate-9)] hover:text-white hover:underline my-1\",\"children\":\"Terms of Service\"}],[\"$\",\"$L10\",null,{\"href\":\"/privacy-policy\",\"className\":\"text-sm text-[var(--slate-9)] hover:text-white hover:underline my-1\",\"children\":\"Privacy Policy\"}]]}],[\"$\",\"div\",null,{\"className\":\"flex flex-col gap-4\",\"children\":[[\"$\",\"$L10\",null,{\"href\":\"/blogs\",\"className\":\"text-[var(--slate-9)] hover:text-white hover:underline\",\"target\":\"\",\"children\":\"Blog\"}],[\"$\",\"$L10\",null,{\"href\":\"https://docs.morph-data.io/docs/en\",\"className\":\"text-[var(--slate-9)] hover:text-white hover:underline\",\"target\":\"_blank\",\"children\":\"Docs\"}],[\"$\",\"$L10\",null,{\"href\":\"/pricing\",\"className\":\"text-[var(--slate-9)] hover:text-white hover:underline\",\"target\":\"\",\"children\":\"Pricing\"}]]}],[\"$\",\"div\",null,{\"className\":\"flex flex-col gap-4\",\"children\":[[\"$\",\"div\",null,{\"children\":[[\"$\",\"$L10\",null,{\"href\":\"https://twitter.com/morphdbHQ\",\"rel\":\"noopener noreferrer\",\"target\":\"_blank\",\"children\":[\"$\",\"$Lf\",null,{\"src\":\"/assets/x-white-logo.png\",\"height\":25,\"width\":25,\"alt\":\"Morph\",\"className\":\"inline-block cursor-pointer mr-3\"}]}],[\"$\",\"$L10\",null,{\"href\":\"https://discord.gg/8ZcSbDrN6e\",\"rel\":\"noopener noreferrer\",\"target\":\"_blank\",\"children\":[\"$\",\"$Lf\",null,{\"src\":\"/assets/discord-white-icon.png\",\"height\":25,\"width\":25,\"alt\":\"Morph\",\"className\":\"inline-block cursor-pointer mr-4\"}]}],[\"$\",\"$L10\",null,{\"href\":\"https://www.linkedin.com/company/morphdb/about/\",\"rel\":\"noopener noreferrer\",\"target\":\"_blank\",\"children\":[\"$\",\"$Lf\",null,{\"src\":\"/assets/linkedin-app-white-icon.png\",\"height\":25,\"width\":25,\"alt\":\"Morph\",\"className\":\"inline-block cursor-pointer\"}]}]],\"style\":\"$undefined\",\"className\":\"rt-Flex w-full py-1\"}],[\"$\",\"div\",null,{\"className\":\"flex-1\"}],[\"$\",\"p\",null,{\"className\":\"text-[var(--slate-9)] text-sm\",\"children\":\"© 2024 Morph. All rights reserved.\"}]]}]]}]}]}]}]]}]}]]}],[\"$\",\"$L11\",null,{}],[\"$\",\"$L12\",null,{\"gaId\":\"G-S8YRCL4JQW\"}]]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[false,\"$L13\"],\"globalErrorComponent\":\"$14\",\"missingSlots\":\"$W15\"}]]\n"])</script><script>self.__next_f.push([1,"8:[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"blog\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":\"$L16\",\"templateStyles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/df58b362c76677f9.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],\"templateScripts\":[],\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}]\n"])</script><script>self.__next_f.push([1,"17:I[7631,[\"8173\",\"static/chunks/8173-114e2eeaae9e6aa9.js\",\"5813\",\"static/chunks/5813-46de9cb53c5263b9.js\",\"231\",\"static/chunks/231-264d60bf1d424be4.js\",\"2630\",\"static/chunks/2630-3c42b776210aaa43.js\",\"4980\",\"static/chunks/app/blog/template-152ffeacefd01572.js\"],\"RelatedArticlesEn\"]\n16:[\"$\",\"main\",null,{\"className\":\"\",\"children\":[\"$\",\"div\",null,{\"className\":\"p-4 lg:p-0 container mx-auto\",\"children\":[[\"$\",\"section\",null,{\"className\":\"p-6 lg:p-10 rounded-xl flex flex-col gap-6 items-center mb-10 \",\"children\":[\"$\",\"article\",null,{\"className\":\"prose dark:prose-invert max-w-[960px] mb-[40px]\",\"children\":[\"$\",\"$L7\",null,{}]}]}],[\"$\",\"section\",null,{\"className\":\"p-6 lg:p-10 rounded-xl flex flex-col gap-6 items-center mb-10 \",\"children\":[\"$\",\"$L17\",null,{\"slug\":\"2023/introducing-similarity-search-api\"}]}]]}]}]\n"])</script><script>self.__next_f.push([1,"13:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Vector Search API - Morph Blog\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Searching in Morph with PostgreSQL\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:title\",\"content\":\"Vector Search API\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:description\",\"content\":\"Searching in Morph with PostgreSQL\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:url\",\"content\":\"https://www.morph-data.io/blog/2023/introducing-similarity-search-api\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:site_name\",\"content\":\"Morph\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:image\",\"content\":\"https://www.morph-data.io/assets/blog/2023/vectorsearch.png\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"10\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"11\",{\"name\":\"twitter:title\",\"content\":\"Vector Search API\"}],[\"$\",\"meta\",\"12\",{\"name\":\"twitter:description\",\"content\":\"Searching in Morph with PostgreSQL\"}],[\"$\",\"meta\",\"13\",{\"name\":\"twitter:image\",\"content\":\"https://www.morph-data.io/assets/blog/2023/vectorsearch.png\"}],[\"$\",\"link\",\"14\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"48x48\"}],[\"$\",\"meta\",\"15\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10