Skip to content

Commit

Permalink
Rewrite the ESRE guide (now AI Search guide!!!)
Browse files Browse the repository at this point in the history
  • Loading branch information
afoucret committed Sep 18, 2023
1 parent 9e3c312 commit 8f62685
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 112 deletions.
10 changes: 6 additions & 4 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
const ELASTIC_WEBSITE_URL = meta.elasticWebsiteUrl;
const DOCS_WEBSITE_URL = meta.docsWebsiteUrl;
const ELASTIC_GITHUB = meta.elasticGithubUrl;
const SEARCH_LABS_URL = meta.searchLabsUrl;

const ELASTICSEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/`;
const KIBANA_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/`;
Expand All @@ -36,6 +37,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
const MACHINE_LEARNING_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/`;
const SERVERLESS_DOCS = `${DOCS_WEBSITE_URL}serverless/`;
const SERVERLESS_ELASTICSEARCH_DOCS = `${SERVERLESS_DOCS}elasticsearch/`;
const SEARCH_LABS_REPO = `${ELASTIC_GITHUB}elasticsearch-labs/`

return deepFreeze({
settings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/settings.html`,
Expand Down Expand Up @@ -128,6 +130,8 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
webCrawlerReference: `${APP_SEARCH_DOCS}web-crawler-reference.html`,
},
enterpriseSearch: {
aiSearchDoc: `${ESRE_DOCS}`,
aiSearchHelp: `${ESRE_DOCS}help.html`,
apiKeys: `${KIBANA_DOCS}api-keys.html`,
behavioralAnalytics: `${ENTERPRISE_SEARCH_DOCS}analytics-overview.html`,
behavioralAnalyticsCORS: `${ENTERPRISE_SEARCH_DOCS}analytics-cors-proxy.html`,
Expand Down Expand Up @@ -168,10 +172,6 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
documentLevelSecurity: `${ELASTICSEARCH_DOCS}document-level-security.html`,
elser: `${ENTERPRISE_SEARCH_DOCS}elser-text-expansion.html`,
engines: `${ENTERPRISE_SEARCH_DOCS}engines.html`,
esre: `${ESRE_DOCS}index.html`,
esreFaq: `${ESRE_DOCS}faq.html`,
esreHelp: `${ESRE_DOCS}help.html`,
esreLearn: `${ESRE_DOCS}learn.html`,
indexApi: `${ELASTICSEARCH_DOCS}docs-index_.html`,
ingestionApis: `${ENTERPRISE_SEARCH_DOCS}ingestion-apis.html`,
ingestPipelines: `${ENTERPRISE_SEARCH_DOCS}ingest-pipelines.html`,
Expand All @@ -188,6 +188,8 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
searchApplicationsSearchApi: `${ENTERPRISE_SEARCH_DOCS}search-applications-safe-search.html`,
searchApplications: `${ENTERPRISE_SEARCH_DOCS}search-applications.html`,
searchApplicationsSearch: `${ENTERPRISE_SEARCH_DOCS}search-applications-search.html`,
searchLabs: `${SEARCH_LABS_URL}`,
searchLabsRepo: `${SEARCH_LABS_REPO}`,
searchTemplates: `${ELASTICSEARCH_DOCS}search-template.html`,
start: `${ENTERPRISE_SEARCH_DOCS}start.html`,
supportedNlpModels: `${MACHINE_LEARNING_DOCS}ml-nlp-model-ref.html`,
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/get_doc_meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ export const getDocLinksMeta = ({ kibanaBranch }: GetDocLinksMetaOptions): DocLi
elasticWebsiteUrl: 'https://www.elastic.co/',
elasticGithubUrl: 'https://github.com/elastic/',
docsWebsiteUrl: 'https://docs.elastic.co/',
"searchLabsUrl": 'https://search-labs.elastic.co/'
};
};
9 changes: 5 additions & 4 deletions packages/kbn-doc-links/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface DocLinksMeta {
elasticWebsiteUrl: string;
elasticGithubUrl: string;
docsWebsiteUrl: string;
searchLabsUrl: string;
}

/**
Expand Down Expand Up @@ -110,6 +111,8 @@ export interface DocLinks {
readonly webCrawlerReference: string;
};
readonly enterpriseSearch: {
readonly aiSearchDoc: string;
readonly aiSearchHelp: string;
readonly apiKeys: string;
readonly behavioralAnalytics: string;
readonly behavioralAnalyticsCORS: string;
Expand Down Expand Up @@ -150,10 +153,6 @@ export interface DocLinks {
readonly documentLevelSecurity: string;
readonly elser: string;
readonly engines: string;
readonly esre: string;
readonly esreFaq: string;
readonly esreHelp: string;
readonly esreLearn: string;
readonly indexApi: string;
readonly ingestionApis: string;
readonly ingestPipelines: string;
Expand All @@ -170,6 +169,8 @@ export interface DocLinks {
readonly searchApplicationsSearchApi: string;
readonly searchApplications: string;
readonly searchApplicationsSearch: string;
readonly searchLabs: string;
readonly searchLabsRepo: string;
readonly searchTemplates: string;
readonly start: string;
readonly supportedNlpModels: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ import { FormattedMessage } from '@kbn/i18n-react';

import { docLinks } from '../../../shared/doc_links';

export const AISetAiSearchChromeSearchDocsSection: React.FC = () => (
export const SetAISearchChromeSearchDocsSection: React.FC = () => (
<EuiFlexGroup alignItems="center">
<EuiFlexItem grow={4}>
<EuiFlexGroup direction="column" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiTitle>
<h2>
<FormattedMessage
id="xpack.enterpriseSearch.aiSearch.esreDocsSection.title"
defaultMessage="Dive deeper with the ESRE docs"
id="xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.title"
defaultMessage="Dive deeper with AI Search"
/>
</h2>
</EuiTitle>
Expand All @@ -32,20 +32,20 @@ export const AISetAiSearchChromeSearchDocsSection: React.FC = () => (
<EuiText>
<p>
<FormattedMessage
id="xpack.enterpriseSearch.aiSearch.esreDocsSection.description"
defaultMessage="To learn more about how to get started with ESRE, and test these tools with concrete examples, visit the {esreDocumentation}."
id="xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.description"
defaultMessage="To learn more about how to get started and test these tools with concrete examples, visit {searchLab}."
values={{
esreDocumentation: (
searchLab: (
<EuiLink
data-telemetry-id="entSearch-esre-documentation-esreHomeLink"
data-telemetry-id="entSearch-aiSearch-documentation-esreHomeLink"
target="_blank"
href={docLinks.esre}
href={docLinks.searchLabs}
external
>
{i18n.translate(
'xpack.enterpriseSearch.aiSearch.esreDocsSection.description.esreLinkText',
'xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.description.searchLabsLinkText',
{
defaultMessage: 'ESRE documentation',
defaultMessage: 'Search Labs',
}
)}
</EuiLink>
Expand All @@ -66,7 +66,7 @@ export const AISetAiSearchChromeSearchDocsSection: React.FC = () => (
<EuiTitle size="s">
<h3>
<FormattedMessage
id="xpack.enterpriseSearch.aiSearch.esreDocsSection.learn.title"
id="xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.learn.title"
defaultMessage="Learn"
/>
</h3>
Expand All @@ -76,20 +76,20 @@ export const AISetAiSearchChromeSearchDocsSection: React.FC = () => (
<EuiText>
<p>
<FormattedMessage
id="xpack.enterpriseSearch.aiSearch.esreDocsSection.learn.description"
defaultMessage="These are complex subjects, so we've curated some {learningTopics} to help you get started."
id="xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.learn.description"
defaultMessage="The {searchLabsRepo} has notebooks, sample apps, and resources."
values={{
learningTopics: (
searchLabsRepo: (
<EuiLink
data-telemetry-id="entSearch-esre-documentation-esreLearnLink"
data-telemetry-id="entSearch-aiSearch-documentation-searchLabsRepoLink"
target="_blank"
href={docLinks.esreLearn}
external={false}
href={docLinks.searchLabsRepo}
external={true}
>
{i18n.translate(
'xpack.enterpriseSearch.aiSearch.esreDocsSection.learn.learningTopicsLinkText',
'xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.learn.searchLabsRepoLinkText',
{
defaultMessage: 'learning topics',
defaultMessage: 'Search Labs Github repo',
}
)}
</EuiLink>
Expand All @@ -109,8 +109,8 @@ export const AISetAiSearchChromeSearchDocsSection: React.FC = () => (
<EuiTitle size="s">
<h3>
<FormattedMessage
id="xpack.enterpriseSearch.aiSearch.esreDocsSection.faq.title"
defaultMessage="FAQ"
id="xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.doc.title"
defaultMessage="Docs"
/>
</h3>
</EuiTitle>
Expand All @@ -119,20 +119,20 @@ export const AISetAiSearchChromeSearchDocsSection: React.FC = () => (
<EuiText>
<p>
<FormattedMessage
id="xpack.enterpriseSearch.aiSearch.esreDocsSection.faq.description"
defaultMessage="Learn what ESRE is (and isn't) from these {frequentlyAskedQuestions}."
id="xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.doc.description"
defaultMessage="Visit the {aiSearchDoc}."
values={{
frequentlyAskedQuestions: (
aiSearchDoc: (
<EuiLink
data-telemetry-id="entSearch-esre-documentation-esreFaqLink"
data-telemetry-id="entSearch-aiSearch-documentation-aiSearchDocLink"
target="_blank"
href={docLinks.esreFaq}
external={false}
href={docLinks.aiSearchDoc}
external={true}
>
{i18n.translate(
'xpack.enterpriseSearch.aiSearch.esreDocsSection.learn.frequentlyAskedQuestionsLinkText',
'xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.doc.aiSearchDocLinkText',
{
defaultMessage: 'frequently asked questions',
defaultMessage: 'Elastic documentation',
}
)}
</EuiLink>
Expand All @@ -152,7 +152,7 @@ export const AISetAiSearchChromeSearchDocsSection: React.FC = () => (
<EuiTitle size="s">
<h3>
<FormattedMessage
id="xpack.enterpriseSearch.aiSearch.esreDocsSection.help.title"
id="xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.help.title"
defaultMessage="Help"
/>
</h3>
Expand All @@ -162,20 +162,20 @@ export const AISetAiSearchChromeSearchDocsSection: React.FC = () => (
<EuiText>
<p>
<FormattedMessage
id="xpack.enterpriseSearch.aiSearch.esreDocsSection.help.description"
id="xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.help.description"
defaultMessage="Need help? Check out the {discussForum}!"
values={{
discussForum: (
<EuiLink
data-telemetry-id="entSearch-esre-documentation-esreHelpLink"
data-telemetry-id="entSearch-aiSearch-documentation-aiSearchHelpLink"
target="_blank"
href={docLinks.esreHelp}
href={docLinks.aiSearchHelp}
external={false}
>
{i18n.translate(
'xpack.enterpriseSearch.aiSearch.esreDocsSection.learn.discussForumLinkText',
'xpack.enterpriseSearch.aiSearch.aiSearchDocsSection.help.helpLinkText',
{
defaultMessage: 'ESRE discuss forum',
defaultMessage: 'discuss forum or Elastic community Slack',
}
)}
</EuiLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import simplifyIllustration from '../../../../assets/images/simplify.svg';
import { SetAiSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome';
import { EnterpriseSearchEsrePageTemplate } from '../layout/page_template';

import { AISetAiSearchChromeSearchDocsSection } from './ai_search_docs_section';
import { SetAISearchChromeSearchDocsSection } from './ai_search_docs_section';
import { MeasurePerformanceSection } from './measure_performance_section';
import { RankAggregationSection } from './rank_aggregation_section';
import { SemanticSearchSection } from './semantic_search_section';
Expand All @@ -40,7 +40,7 @@ export const AISearchGuide: React.FC = () => {
bottomBorder={false}
pageHeader={{
pageTitle: i18n.translate('xpack.enterpriseSearch.aiSearch.guide.pageTitle', {
defaultMessage: 'Enhance your search with ESRE',
defaultMessage: 'Enhance your search with AI',
}),
}}
>
Expand All @@ -64,10 +64,10 @@ export const AISearchGuide: React.FC = () => {
</EuiFlexItem>
<EuiFlexItem grow>
<EuiText>
<p data-test-subj="esre-description-text">
<p data-test-subj="ai-search-description-text">
<FormattedMessage
id="xpack.enterpriseSearch.aiSearch.guide.description"
defaultMessage="The Elasticsearch Relevance Engine™ (ESRE) enables developers to build AI search-powered applications using the Elastic platform. ESRE is a set of tools and features that include our proprietary trained ML model ELSER, our vector search and embeddings capabilities, and RRF ranking for combining vector and text search."
defaultMessage="Build AI search-powered applications using the Elastic platform, including our proprietary trained ML model ELSER, our vector search and embeddings capabilities, and RRF ranking for combining vector and text search."
/>
</p>
</EuiText>
Expand All @@ -85,7 +85,7 @@ export const AISearchGuide: React.FC = () => {
</EuiFlexItem>
<EuiHorizontalRule />
<EuiFlexItem grow>
<AISetAiSearchChromeSearchDocsSection />
<SetAISearchChromeSearchDocsSection />
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const ElserPanel: React.FC = () => (
elser: (
<EuiLink target="_blank" href={docLinks.elser} external={false}>
{i18n.translate('xpack.enterpriseSearch.aiSearch.elser.description.elserLinkText', {
defaultMessage: 'Elastic Learned Sparse Encoder',
defaultMessage: 'Elastic Learned Sparse Encoder v2',
})}
</EuiLink>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import { DocLinksStart } from '@kbn/core/public';

class DocLinks {
public aiSearchDoc: string;
public aiSearchHelp: string;
public apiKeys: string;
public appSearchAdaptiveRelevance: string;
public appSearchApiClients: string;
Expand Down Expand Up @@ -103,10 +105,6 @@ class DocLinks {
public enterpriseSearchMailService: string;
public enterpriseSearchTroubleshootSetup: string;
public enterpriseSearchUsersAccess: string;
public esre: string;
public esreFaq: string;
public esreHelp: string;
public esreLearn: string;
public indexApi: string;
public ingestionApis: string;
public ingestPipelines: string;
Expand All @@ -127,6 +125,8 @@ class DocLinks {
public searchApplicationsSearch: string;
public searchApplicationsTemplates: string;
public searchApplicationsSearchApi: string;
public searchLabs: string;
public searchLabsRepo: string;
public searchTemplates: string;
public searchUIAppSearch: string;
public searchUIElasticsearch: string;
Expand Down Expand Up @@ -172,6 +172,8 @@ class DocLinks {
public workplaceSearchZoom: string;

constructor() {
this.aiSearchDoc = '';
this.aiSearchHelp = '';
this.apiKeys = '';
this.appSearchAdaptiveRelevance = '';
this.appSearchApis = '';
Expand Down Expand Up @@ -267,10 +269,6 @@ class DocLinks {
this.enterpriseSearchMailService = '';
this.enterpriseSearchTroubleshootSetup = '';
this.enterpriseSearchUsersAccess = '';
this.esre = '';
this.esreFaq = '';
this.esreHelp = '';
this.esreLearn = '';
this.indexApi = '';
this.ingestionApis = '';
this.ingestPipelines = '';
Expand All @@ -293,6 +291,8 @@ class DocLinks {
this.searchApplications = '';
this.searchApplicationsSearch = '';
this.searchApplicationsSearchApi = '';
this.searchLabs = '';
this.searchLabsRepo = '';
this.searchTemplates = '';
this.start = '';
this.supportedNlpModels = '';
Expand Down Expand Up @@ -337,6 +337,8 @@ class DocLinks {
}

public setDocLinks(docLinks: DocLinksStart): void {
this.aiSearchDoc = docLinks.links.enterpriseSearch.aiSearchDoc;
this.aiSearchHelp = docLinks.links.enterpriseSearch.aiSearchHelp;
this.apiKeys = docLinks.links.enterpriseSearch.apiKeys;
this.appSearchAdaptiveRelevance = docLinks.links.appSearch.adaptiveRelevance;
this.appSearchApis = docLinks.links.appSearch.apiRef;
Expand Down Expand Up @@ -432,10 +434,6 @@ class DocLinks {
this.enterpriseSearchMailService = docLinks.links.enterpriseSearch.mailService;
this.enterpriseSearchTroubleshootSetup = docLinks.links.enterpriseSearch.troubleshootSetup;
this.enterpriseSearchUsersAccess = docLinks.links.enterpriseSearch.usersAccess;
this.esre = docLinks.links.enterpriseSearch.esre;
this.esreFaq = docLinks.links.enterpriseSearch.esreFaq;
this.esreHelp = docLinks.links.enterpriseSearch.esreHelp;
this.esreLearn = docLinks.links.enterpriseSearch.esreLearn;
this.indexApi = docLinks.links.enterpriseSearch.indexApi;
this.ingestionApis = docLinks.links.enterpriseSearch.ingestionApis;
this.ingestPipelines = docLinks.links.enterpriseSearch.ingestPipelines;
Expand All @@ -459,6 +457,8 @@ class DocLinks {
this.searchApplicationsSearchApi = docLinks.links.enterpriseSearch.searchApplicationsSearchApi;
this.searchApplications = docLinks.links.enterpriseSearch.searchApplications;
this.searchApplicationsSearch = docLinks.links.enterpriseSearch.searchApplicationsSearch;
this.searchLabs = docLinks.links.enterpriseSearch.searchLabs;
this.searchLabsRepo = docLinks.links.enterpriseSearch.searchLabsRepo;
this.searchTemplates = docLinks.links.enterpriseSearch.searchTemplates;
this.start = docLinks.links.enterpriseSearch.start;
this.supportedNlpModels = docLinks.links.enterpriseSearch.supportedNlpModels;
Expand Down
Loading

0 comments on commit 8f62685

Please sign in to comment.