1
0
Fork 0

chore: Promote DocSearch v4 from Beta to Stable (#2752)

Co-authored-by: Paul Jankowski <8BitTitan@gmail.com>
Co-authored-by: Paul Jankowski <33367713+8bittitan@users.noreply.github.com>
This commit is contained in:
Dylan Tientcheu 2025-09-15 16:41:59 +02:00 committed by GitHub
parent f6e5541191
commit 6921e7225a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 38 additions and 53 deletions

View file

@ -5,15 +5,15 @@ Style package for [DocSearch](http://docsearch.algolia.com/), the best search ex
## Installation
```bash
yarn add @docsearch/css@beta
yarn add @docsearch/css@4
# or
npm install @docsearch/css@beta
npm install @docsearch/css@4
```
If you dont want to use a package manager, you can use a standalone endpoint:
```html
<script src="https://cdn.jsdelivr.net/npm/@docsearch/css@beta"></script>
<script src="https://cdn.jsdelivr.net/npm/@docsearch/css@4"></script>
```
## Get started

View file

@ -5,9 +5,9 @@ JavaScript package for [DocSearch](http://docsearch.algolia.com/), the best sear
## Installation
```sh
yarn add @docsearch/js@beta
yarn add @docsearch/js@4
# or
npm install @docsearch/js@beta
npm install @docsearch/js@4
```
## Get started
@ -15,7 +15,7 @@ npm install @docsearch/js@beta
If you dont want to use a package manager, you can use a standalone endpoint:
```html
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@beta"></script>
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@4"></script>
```
To get started, you need a [`container`](https://docsearch.algolia.com/docs/api#container) for your DocSearch component to go in. If you dont have one already, you can insert one into your markup:

View file

@ -5,15 +5,15 @@ React package for [DocSearch](http://docsearch.algolia.com/), the best search ex
## Installation
```bash
yarn add @docsearch/react@beta
yarn add @docsearch/react@4
# or
npm install @docsearch/react@beta
npm install @docsearch/react@4
```
If you dont want to use a package manager, you can use a standalone endpoint:
```html
<script src="https://cdn.jsdelivr.net/npm/@docsearch/react@beta"></script>
<script src="https://cdn.jsdelivr.net/npm/@docsearch/react@4"></script>
```
## Get started

View file

@ -191,7 +191,7 @@ function AskAiExchangeCard({
<div key={index} className="DocSearch-AskAiScreen-MessageContent-Tool Tool--Call shimmer">
<LoadingIcon className="DocSearch-AskAiScreen-SmallerLoadingIcon" />
<span>
{`${translations.duringToolCallText || 'Searching for '} "${part.input || ''}" ...`}
{`${translations.duringToolCallText || 'Searching for '} "${part.input.query || ''}" ...`}
</span>
</div>
);
@ -215,7 +215,8 @@ function AskAiExchangeCard({
>
{' '}
&quot;{part.output.query || ''}&quot;
</span>
</span>{' '}
found {part.output.hits?.length || 0} results
</span>
</div>
);

View file

@ -106,10 +106,13 @@ describe('utils', () => {
},
{
type: 'tool-searchIndex',
input: 'What is DocSearch',
input: {
query: 'What is DocSearch',
},
state: 'output-available',
output: {
query: 'DocSearch',
hits: [],
},
toolCallId: 'searchIndex-testing',
},

View file

@ -2,10 +2,13 @@ import type { UIMessage } from '@ai-sdk/react';
import type { UIDataTypes, UIMessagePart } from 'ai';
export interface SearchIndexTool {
input: string;
output: {
input: {
query: string;
};
output: {
query?: string;
hits?: any[];
};
}
export type AIMessage = UIMessage<

View file

@ -6,12 +6,6 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import useBaseUrl from '@docusaurus/useBaseUrl';
:::warning
DocSearch v4 is currently in beta. While it's suitable for production scenarios, expect potential improvements and minor issues. Use at your discretion.
:::
<Tabs
groupId="language"
defaultValue="js"

View file

@ -5,12 +5,6 @@ title: Getting Started with v4
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
:::warning
DocSearch v4 is currently in beta. While it's suitable for production scenarios, expect potential improvements and minor issues. Use at your discretion.
:::
## Introduction
DocSearch v4 provides a significant upgrade over previous versions, offering enhanced accessibility, responsiveness, and an improved search experience for your documentation. Built on [Algolia Autocomplete][1], DocSearch v4 ensures a seamless integration trusted by leading documentation sites worldwide.
@ -30,9 +24,9 @@ DocSearch packages are available on the [npm registry][10].
<TabItem value="js">
```bash
yarn add @docsearch/js@beta
yarn add @docsearch/js@4
# or with npm
npm install @docsearch/js@beta
npm install @docsearch/js@4
```
### Without package manager
@ -40,22 +34,22 @@ npm install @docsearch/js@beta
Include CSS in your website's `<head>`
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@beta" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@4" />
```
And the JavaScript at the end of your `<body>`:
```html
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@beta"></script>
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@4"></script>
```
</TabItem>
<TabItem value="react">
```bash
yarn add @docsearch/react@beta
yarn add @docsearch/react@4
# or
npm install @docsearch/react@beta
npm install @docsearch/react@4
```
### Without package manager
@ -63,13 +57,13 @@ npm install @docsearch/react@beta
Include CSS in your website's `<head>`:
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@beta" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@4" />
```
And the JavaScript at the end of your `<body>`:
```html
<script src="https://cdn.jsdelivr.net/npm/@docsearch/react@beta"></script>
<script src="https://cdn.jsdelivr.net/npm/@docsearch/react@4"></script>
```
</TabItem>
@ -193,7 +187,7 @@ DocSearch v4 introduces support for AskAI, Algolias advanced, AI-powered sear
To enable AskAI, you can add your Algolia Assistant ID as a string, or use an object for more advanced configuration (such as specifying a different index, credentials, or search parameters):
<Tabs groupId="askai-format" defaultValue="string" values={[{ label: 'String', value: 'string' }, { label: 'Object', value: 'object' }]}>
<Tabs groupId="askai-format" defaultValue="string" values={[{ label: 'String', value: 'string' }, { label: 'Object', value: 'object' }]}>
<TabItem value="string">
```js

View file

@ -2,12 +2,6 @@
title: Migrating from v3 to v4
---
:::warning
DocSearch v4 is currently in beta. While it's suitable for production scenarios, expect potential improvements and minor issues. Use at your discretion.
:::
This guide provides detailed information on migrating from [DocSearch v3](/docs/v3/docsearch) to [DocSearch v4](/docs/docsearch), highlighting key differences and new configuration options. For a comprehensive overview, refer to the [API reference](/docs/api) and [Getting Started Guide](/docs/docsearch).
## If You're Using Algolia Keyword Search Only

View file

@ -27,15 +27,15 @@ This package is a dependency of [`@docsearch/js`][1] and [`@docsearch/react`][1]
## Installation
```bash
yarn add @docsearch/css@beta
yarn add @docsearch/css@4
# or
npm install @docsearch/css@beta
npm install @docsearch/css@4
```
If you dont want to use a package manager, you can use a standalone endpoint:
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@beta" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@4" />
```
## Files

View file

@ -13,10 +13,6 @@ The Ask AI API enables developers to build custom chat interfaces powered by Alg
- Authorization token authentication for secure API access
- Full compatibility with popular frameworks like Next.js and Vercel AI SDK
:::warning
Ask AI is a **private beta** feature under the [Algolia Terms of Service ("Beta Services")](https://www.algolia.com/policies/terms/).
Use of this feature is subject to [Algolia's GenAI Addendum](https://www.algolia.com/policies/algolia-genai-addendum).
:::
:::info
This API documentation is primarily for developers building custom Ask AI integrations. If you're using the DocSearch package, you typically won't need this information since DocSearch handles the Ask AI API integration automatically. For standard DocSearch usage, see the [DocSearch documentation](/docs/docsearch) instead.

View file

@ -38,13 +38,13 @@ export default {
editUrl: 'https://github.com/algolia/docsearch/edit/main/packages/website/',
versions: {
current: {
label: 'Beta (v4.x)',
label: 'Stable (v4.x)',
},
v3: {
label: 'Stable (v3.x)',
label: 'Legacy (v3.x)',
},
legacy: {
label: 'Legacy',
label: 'Legacy (v1.x - v2.x)',
},
},
lastVersion: 'current',
@ -128,7 +128,7 @@ export default {
announcementBar: {
id: 'announcement-bar',
content:
'🚀 Ask AI now in Public Beta! Turn your docs site search into an AI-powered assistant faster answers, fewer tickets, better self-serve. <a target="_blank" rel="noopener noreferrer" href="https://dashboard.algolia.com/ask-ai">Get Started Now</a>',
'🚀 Use AskAI Now! Turn your docs site search into an AI-powered assistant faster answers, fewer tickets, better self-serve. <a target="_blank" rel="noopener noreferrer" href="https://dashboard.algolia.com/ask-ai">Get Started Now</a>',
},
colorMode: {
defaultMode: 'light',

View file

@ -23,7 +23,7 @@ export default {
},
{
type: 'category',
label: 'Algolia AskAI - Beta',
label: 'Algolia AskAI',
items: [
'v4/askai',
'v4/askai-api',