Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates Get started page #183

Merged
merged 36 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
c3b534d
Updates Get started page
kosabogi Nov 8, 2024
fe6e543
Updating serverless docs (#172)
georgewallace Nov 11, 2024
ae4cbb0
[Serverless] Adds Trained model autoscaling page (#139)
kosabogi Nov 12, 2024
a390bdc
Updates Get started to align with the new user flow
kosabogi Nov 12, 2024
cab06c9
Update serverless/pages/get-started.asciidoc
kosabogi Nov 13, 2024
b7fd129
Update serverless/pages/get-started.asciidoc
kosabogi Nov 13, 2024
0384cfd
Resolves comments
kosabogi Nov 13, 2024
e441ee7
Modifies Get started guide, renames and updates Create a new API key …
kosabogi Nov 14, 2024
1832321
Update serverless/pages/connecting-to-es-endpoint.asciidoc
kosabogi Nov 14, 2024
4d69b0f
Update serverless/pages/connecting-to-es-endpoint.asciidoc
kosabogi Nov 14, 2024
ce03fa6
Update serverless/pages/connecting-to-es-endpoint.asciidoc
kosabogi Nov 14, 2024
5e0aedf
Update serverless/pages/connecting-to-es-endpoint.asciidoc
kosabogi Nov 14, 2024
7e92800
Update serverless/pages/connecting-to-es-endpoint.asciidoc
kosabogi Nov 14, 2024
dd1f8d6
Update serverless/pages/connecting-to-es-endpoint.asciidoc
kosabogi Nov 14, 2024
6d97fe6
Adds details about alternative methods
kosabogi Nov 18, 2024
0845b96
Updates structure
kosabogi Nov 18, 2024
9aba6f8
Merge remote-tracking branch 'origin/main' into update-get-started-page
kosabogi Nov 18, 2024
1b2bb53
Merge branch 'main' into update-get-started-page
kosabogi Nov 18, 2024
14c9f3e
Revert id
leemthompo Nov 18, 2024
0bea4a1
fix other instance
leemthompo Nov 18, 2024
660097d
Update serverless/pages/get-started.asciidoc
kosabogi Nov 18, 2024
1b20770
Update serverless/pages/get-started.asciidoc
kosabogi Nov 18, 2024
6572cbc
Update serverless/pages/get-started.asciidoc
kosabogi Nov 18, 2024
fe511c5
Update serverless/pages/connecting-to-es-endpoint.asciidoc
kosabogi Nov 18, 2024
f4c851b
Update serverless/pages/get-started.asciidoc
kosabogi Nov 18, 2024
9ce292b
Updates page
kosabogi Nov 19, 2024
6f814c7
Update serverless/pages/get-started.asciidoc
kosabogi Nov 19, 2024
31bc23b
Update serverless/pages/get-started.asciidoc
kosabogi Nov 19, 2024
d6005f7
Update serverless/pages/get-started.asciidoc
kosabogi Nov 19, 2024
2b83622
Update serverless/pages/get-started.asciidoc
kosabogi Nov 19, 2024
97ef301
Update serverless/pages/get-started.asciidoc
kosabogi Nov 19, 2024
2c5ca93
Update serverless/pages/get-started.asciidoc
kosabogi Nov 19, 2024
4d4c7cd
Update serverless/pages/get-started.asciidoc
kosabogi Nov 19, 2024
dcedf12
Final fixes
kosabogi Nov 19, 2024
5dfa344
Update serverless/pages/connecting-to-es-endpoint.asciidoc
kosabogi Nov 19, 2024
36dd995
Update serverless/pages/get-started.asciidoc
kosabogi Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added serverless/images/copy-connection-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added serverless/images/create-an-api-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified serverless/images/index-management-index-templates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified serverless/images/index-management-indices.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified serverless/images/management-data-stream.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified serverless/images/management-enrich-policies.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added serverless/images/ml-nlp-deployment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions serverless/index-serverless-elasticsearch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ include::./pages/pricing.asciidoc[leveloffset=+2]

include::./pages/get-started.asciidoc[leveloffset=+2]

include::./pages/connecting-to-es-endpoint.asciidoc[leveloffset=+2]

include::./pages/clients.asciidoc[leveloffset=+2]
include::./pages/clients-go-getting-started.asciidoc[leveloffset=+3]
include::./pages/clients-java-getting-started.asciidoc[leveloffset=+3]
Expand Down
2 changes: 2 additions & 0 deletions serverless/index-serverless-general.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ include::./pages/service-status.asciidoc[leveloffset=+2]
include::./pages/user-profile.asciidoc[leveloffset=+2]

include::./pages/cloud-regions.asciidoc[leveloffset=+2]

include::./pages/ml-nlp-auto-scale.asciidoc[leveloffset=+2]
79 changes: 79 additions & 0 deletions serverless/pages/connecting-to-es-endpoint.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[[elasticsearch-connecting-to-es-serverless-endpoint]]
= Connecting to your Elasticsearch Serverless endpoint

kosabogi marked this conversation as resolved.
Show resolved Hide resolved
kosabogi marked this conversation as resolved.
Show resolved Hide resolved
[discrete]
[[elasticsearch-create-new-api-key]]
== Create a new API key
leemthompo marked this conversation as resolved.
Show resolved Hide resolved

Create an API key, which will enable you to access the {es} API to ingest and search data.
kosabogi marked this conversation as resolved.
Show resolved Hide resolved

. On the **Getting Started** page, scroll to **Add an API Key** and select **New**.
kosabogi marked this conversation as resolved.
Show resolved Hide resolved
kosabogi marked this conversation as resolved.
Show resolved Hide resolved
+
image::images/create-an-api-key.png[Create an API key.]
. In **Create API Key**, enter a name for your key and (optionally) set an expiration date.
. (Optional) Under **Control Security privileges**, you can set specific access permissions for this API key. By default, it has full access to all APIs.
. (Optional) The **Add metadata** section allows you to add custom key-value pairs to help identify and organize your API keys.
. Select **Create API Key** to finish.

After creation, you'll see your API key displayed as an encoded string.
Store this encoded API key securely. It is displayed only once and cannot be retrieved later.
You will use this encoded API key when sending API requests.

[NOTE]
====
You can't recover or retrieve a lost API key. Instead, you must delete the key and create a new one.
====

[discrete]
[[elasticsearch-get-started-copy-url]]
== Copy your {es} endpoint

Copy the URL of your {es} API endpoint.
You'll send all {es} API requests to this URL.
kosabogi marked this conversation as resolved.
Show resolved Hide resolved

. On the **Getting Started** page, scroll to **Copy your connection details** section, and find the **Elasticsearch endpoint** field.
. Copy the URL for the Elasticsearch endpoint.

image::images/copy-connection-details.png[Copy your Elasticsearch endpoint.]

[discrete]
[[elasticsearch-get-started-test-connection]]
== Test connection

We'll use the `curl` command to test your connection and make additional API requests.
kosabogi marked this conversation as resolved.
Show resolved Hide resolved
(See https://everything.curl.dev/install/index.html[Install curl] if you need to install this program.)
kosabogi marked this conversation as resolved.
Show resolved Hide resolved

`curl` will need access to your Elasticsearch endpoint and `encoded` API key.
Within your terminal, assign these values to the `ES_URL` and `API_KEY` environment variables.

For example:

[source,bash]
----
export ES_URL="https://dda7de7f1d264286a8fc9741c7741690.es.us-east-1.aws.elastic.cloud:443"
export API_KEY="ZFZRbF9Jb0JDMEoxaVhoR2pSa3Q6dExwdmJSaldRTHFXWEp4TFFlR19Hdw=="
----

Then run the following command to test your connection:

[source,bash]
----
curl "${ES_URL}" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "Content-Type: application/json"
----

You should receive a response similar to the following:

[source,json]
----
{
"name" : "serverless",
"cluster_name" : "dda7de7f1d264286a8fc9741c7741690",
"cluster_uuid" : "ws0IbTBUQfigmYAVMztkZQ",
"version" : { ... },
"tagline" : "You Know, for Search"
}
----

Now you're ready to ingest and search some sample documents.
kosabogi marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion serverless/pages/developer-tools-troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Elasticsearch returns an `index_not_found_exception` when the data stream, index
or alias you try to query does not exist. This can happen when you misspell the
name or when the data has been indexed to a different data stream or index.

Use the https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-indices-exists-index-template[**Exists API**] to check whether
Use the https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-indices-exists[**Exists API**] to check whether
a data stream, index, or alias exists:

[source,js]
Expand Down
241 changes: 44 additions & 197 deletions serverless/pages/get-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,226 +26,73 @@ Use your {ecloud} account to create a fully-managed {es} project:
Select **Create project** to continue.
. Once the project is ready, select **Continue**.

You should now see **Get started with {es}**, and you're ready to continue.

include::../partials/minimum-vcus-detail.asciidoc[]

[discrete]
[[elasticsearch-get-started-create-api-key]]
== Create API key
[[elasticsearch-get-started-create-index]]
== Create an index

Create an API key, which will enable you to access the {es} API to ingest and search data.
Once your project is set up, you'll be directed to a page where you can create your first index.
An index is where documents are stored and organized, making it possible to search and retrieve data.

. On the **Getting Started** page, scroll to **Add an API Key** and select **New**.
. In **Create API Key**, enter a name for your key and (optionally) set an expiration date.
. (Optional) Under **Control Security privileges**, you can set specific access permissions for this API key. By default, it has full access to all APIs.
. (Optional) The **Add metadata** section allows you to add custom key-value pairs to help identify and organize your API keys.
. Select **Create API Key** to finish.
. Enter a name for your index.
. Click *Create my index*. You can also create the index by clicking on *Code* to view and run code through the command line.
+
image::images/get-started-create-an-index.png[Create an index.]

After creation, you'll see your API key displayed as an encoded string.
Store this encoded API key securely. It is displayed only once and cannot be retrieved later.
You will use this encoded API key when sending API requests.
. You’ll be directed to the *Index Management* page. Here, copy and save the following:
- Elasticsearch URL
- API key

[NOTE]
====
You can't recover or retrieve a lost API key. Instead, you must delete the key and create a new one.
You won’t be able to view this API key again. If needed, refer to <<elasticsearch-create-new-api-key,Create a new API key>> to generate a new one.
leemthompo marked this conversation as resolved.
Show resolved Hide resolved
====

[discrete]
[[elasticsearch-get-started-copy-url]]
== Copy URL

Next, copy the URL of your API endpoint.
You'll send all {es} API requests to this URL.

. On the **Getting Started** page, scroll to **Copy your connection details** section, and find the **Elasticsearch endpoint** field.
. Copy the URL for the Elasticsearch endpoint.

Store this value along with your `encoded` API key.
You'll use both values in the next step.

[discrete]
[[elasticsearch-get-started-test-connection]]
== Test connection

We'll use the `curl` command to test your connection and make additional API requests.
(See https://everything.curl.dev/get[Install curl] if you need to install this program.)

`curl` will need access to your Elasticsearch Endpoint and `encoded` API key.
Within your terminal, assign these values to the `ES_URL` and `API_KEY` environment variables.
The UI provides ready-to-use code examples for ingesting data via the REST API.
Choose your preferred tool for making these requests:

For example:

[source,bash]
----
export ES_URL="https://dda7de7f1d264286a8fc9741c7741690.es.us-east-1.aws.elastic.cloud:443"
export API_KEY="ZFZRbF9Jb0JDMEoxaVhoR2pSa3Q6dExwdmJSaldRTHFXWEp4TFFlR19Hdw=="
----

Then run the following command to test your connection:

[source,bash]
----
curl "${ES_URL}" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "Content-Type: application/json"
----

You should receive a response similar to the following:

[source,json]
----
{
"name" : "serverless",
"cluster_name" : "dda7de7f1d264286a8fc9741c7741690",
"cluster_uuid" : "ws0IbTBUQfigmYAVMztkZQ",
"version" : { ... },
"tagline" : "You Know, for Search"
}
----

Now you're ready to ingest and search some sample documents.
* Elastic Console in your project's UI
kosabogi marked this conversation as resolved.
Show resolved Hide resolved
* Python
* JavaScript
* cURL

[discrete]
[[elasticsearch-get-started-ingest-data]]
[[elasticsearch-get-started-continue-on-your-own]]
== Ingest data

[NOTE]
====
This example uses {es} APIs to ingest data. If you'd prefer to upload a file using the UI, refer to <<elasticsearch-ingest-data-file-upload>>.
====
Elasticsearch provides several methods for ingesting data:

kosabogi marked this conversation as resolved.
Show resolved Hide resolved
To ingest data, you must create an index and store some documents.
This process is also called "indexing".

You can index multiple documents using a single `POST` request to the `_bulk` API endpoint.
The request body specifies the documents to store and the indices in which to store them.

{es} will automatically create the index and map each document value to one of its data types.
Include the `?pretty` option to receive a human-readable response.

Run the following command to index some sample documents into the `books` index:

[source,bash]
----
curl -X POST "${ES_URL}/_bulk?pretty" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "Content-Type: application/json" \
-d '
{ "index" : { "_index" : "books" } }
{"name": "Snow Crash", "author": "Neal Stephenson", "release_date": "1992-06-01", "page_count": 470}
{ "index" : { "_index" : "books" } }
{"name": "Revelation Space", "author": "Alastair Reynolds", "release_date": "2000-03-15", "page_count": 585}
{ "index" : { "_index" : "books" } }
{"name": "1984", "author": "George Orwell", "release_date": "1985-06-01", "page_count": 328}
{ "index" : { "_index" : "books" } }
{"name": "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227}
{ "index" : { "_index" : "books" } }
{"name": "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268}
{ "index" : { "_index" : "books" } }
{"name": "The Handmaids Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311}
'
----

You should receive a response indicating there were no errors:

[source,json]
----
{
"errors" : false,
"took" : 1260,
"items" : [ ... ]
}
----
* <<elasticsearch-ingest-data-through-api,{es} API>>
* <<elasticsearch-ingest-data-through-integrations-connector-client,Connector clients>>
* <<elasticsearch-ingest-data-file-upload,File Uploader>>
* <<elasticsearch-ingest-data-through-beats,{beats}>>
* <<elasticsearch-ingest-data-through-logstash,{ls}>>
* https://github.com/elastic/crawler[Elastic Open Web Crawler]

[discrete]
[[elasticsearch-get-started-search-data]]
== Search data

To search, send a `POST` request to the `_search` endpoint, specifying the index to search.
Use the {es} query DSL to construct your request body.

Run the following command to search the `books` index for documents containing `snow`:

[source,bash]
----
curl -X POST "${ES_URL}/books/_search?pretty" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "Content-Type: application/json" \
-d '
{
"query": {
"query_string": {
"query": "snow"
}
}
}
'
----

You should receive a response with the results:

[source,json]
----
{
"took" : 24,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 1,
"relation" : "eq"
},
"max_score" : 1.5904956,
"hits" : [
{
"_index" : "books",
"_id" : "Z3hf_IoBONQ5TXnpLdlY",
"_score" : 1.5904956,
"_source" : {
"name" : "Snow Crash",
"author" : "Neal Stephenson",
"release_date" : "1992-06-01",
"page_count" : 470
}
}
]
}
}
----
For more information on data ingestion and synchronization,
see <<elasticsearch-ingest-your-data>>.
To learn about the search API and query DSL, refer to <<elasticsearch-http-apis>>.

[discrete]
[[elasticsearch-get-started-continue-on-your-own]]
== Continue on your own

Congratulations!
You've set up an {es} project, and you've ingested and searched some sample data.
Now you're ready to continue on your own.
////
/*
- <DocLink slug="/serverless/elasticsearch/search-your-data" />
- <DocLink slug="/serverless/elasticsearch/search-your-data-the-search-api" />
*/
////

[discrete]
[[elasticsearch-get-started-explore]]
=== Explore
== Explore

Want to explore the sample documents or your own data?
*Create a data view*: You can explore data using UI tools like Discover or Dashboards by creating a data view.
Or, you can use {es} aggregations to explore data through the API. Find more information in <<elasticsearch-explore-your-data>>.

By creating a data view, you can explore data using several UI tools, such as Discover or Dashboards. Or, use {es} aggregations to explore your data using the API. Find more information in <<elasticsearch-explore-your-data>>.
*Try Playground*: You can test {es} queries and combine {es} data with LLMs for retrieval augmented generation (RAG) in the
<<elasticsearch-playground>>.

[discrete]
[[elasticsearch-get-started-build]]
=== Build

Ready to build your own solution?

To learn more about sending and syncing data to {es}, or the search API and its query DSL, check <<elasticsearch-ingest-your-data>> and <<elasticsearch-http-apis>>.
*Search your data*: You can perform search queries in {es} to filter by exact values,
conduct full-text searches, or use vector search. Learn more in <<elasticsearch-search-your-data>>.

////
/*
- <DocLink slug="/serverless/elasticsearch/search-your-data" />
- <DocLink slug="/serverless/elasticsearch/search-your-data-the-search-api" />
*/
////
*Use semantic search*: You can retrieve data based on intent and context using NLP and vector embeddings with
<<elasticsearch-reference-semantic-search>>.
2 changes: 1 addition & 1 deletion serverless/pages/index-management.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ To view information about the stream's backing indices, click the number in the
* To view more information about a data stream, such as its generation or its
current index lifecycle policy, click the stream's name. From this view, you can navigate to **Discover** to
further explore data within the data stream.
* preview:[] To edit the data retention value, open the **Manage** menu, and then click **Edit data retention**.
* preview:[] To modify the data retention value, select an index, open the **Manage** menu, and click **Edit data retention**.

////
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ can further process and enhance the data before visualizing it in {kib}.
[NOTE]
====
When you use {beats} to export data to an {es} project, the {beats} require an API key to authenticate with {es}.
Refer to <<elasticsearch-get-started-create-api-key,Create API key>> for the steps to set up your API key,
Refer to <<elasticsearch-create-new-api-key,Create a new API key>> for the steps to set up your API key,
and to https://www.elastic.co/guide/en/beats/filebeat/current/beats-api-keys.html[Grant access using API keys] in the Filebeat documentation for an example of how to configure your {beats} to use the key.
====

Expand Down
Loading