@azure/search-documents 12.1.0-beta.1 → 12.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -19
- package/dist/index.js +634 -224
- package/dist/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/index.js +43 -23
- package/dist-esm/src/generated/data/models/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/mappers.js +127 -0
- package/dist-esm/src/generated/data/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/data/models/parameters.js +74 -74
- package/dist-esm/src/generated/data/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/data/operations/documents.js +8 -8
- package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
- package/dist-esm/src/generated/data/searchClient.js +1 -1
- package/dist-esm/src/generated/data/searchClient.js.map +1 -1
- package/dist-esm/src/generated/service/models/index.js +53 -9
- package/dist-esm/src/generated/service/models/index.js.map +1 -1
- package/dist-esm/src/generated/service/models/mappers.js +159 -16
- package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/service/searchServiceClient.js +1 -1
- package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
- package/dist-esm/src/generatedStringLiteralUnions.js.map +1 -1
- package/dist-esm/src/index.js +2 -2
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/indexModels.js.map +1 -1
- package/dist-esm/src/searchClient.js +2 -5
- package/dist-esm/src/searchClient.js.map +1 -1
- package/dist-esm/src/searchIndexClient.js +5 -5
- package/dist-esm/src/searchIndexClient.js.map +1 -1
- package/dist-esm/src/searchIndexingBufferedSender.js +2 -1
- package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
- package/dist-esm/src/serialization.js +34 -70
- package/dist-esm/src/serialization.js.map +1 -1
- package/dist-esm/src/serviceModels.js.map +1 -1
- package/dist-esm/src/serviceUtils.js +38 -12
- package/dist-esm/src/serviceUtils.js.map +1 -1
- package/dist-esm/src/walk.js +79 -0
- package/dist-esm/src/walk.js.map +1 -0
- package/package.json +11 -10
- package/types/search-documents.d.ts +7679 -7432
- package/dist-esm/src/constants.js +0 -5
- package/dist-esm/src/constants.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,30 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
The Azure AI Search service is well suited for the following application scenarios:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- Consolidate varied content types into a single searchable index.
|
|
8
8
|
To populate an index, you can push JSON documents that contain your content,
|
|
9
9
|
or if your data is already in Azure, create an indexer to pull in data
|
|
10
10
|
automatically.
|
|
11
|
-
|
|
11
|
+
- Attach skillsets to an indexer to create searchable content from images
|
|
12
12
|
and unstructured documents. A skillset leverages APIs from Azure AI Services
|
|
13
13
|
for built-in OCR, entity recognition, key phrase extraction, language
|
|
14
14
|
detection, text translation, and sentiment analysis. You can also add
|
|
15
15
|
custom skills to integrate external processing of your content during
|
|
16
16
|
data ingestion.
|
|
17
|
-
|
|
17
|
+
- In a search client application, implement query logic and user experiences
|
|
18
18
|
similar to commercial web search engines and chat-style apps.
|
|
19
19
|
|
|
20
20
|
Use the @azure/search-documents client library to:
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
- Submit queries using vector, keyword, and hybrid query forms.
|
|
23
|
+
- Implement filtered queries for metadata, geospatial search, faceted navigation,
|
|
24
24
|
or to narrow results based on filter criteria.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
- Create and manage search indexes.
|
|
26
|
+
- Upload and update documents in the search index.
|
|
27
|
+
- Create and manage indexers that pull data from Azure into an index.
|
|
28
|
+
- Create and manage skillsets that add AI enrichment to data ingestion.
|
|
29
|
+
- Create and manage analyzers for advanced text analysis or multi-lingual content.
|
|
30
|
+
- Optimize results through semantic ranking and scoring profiles to factor in business logic or freshness.
|
|
31
31
|
|
|
32
32
|
Key links:
|
|
33
33
|
|
|
@@ -152,6 +152,7 @@ An Azure AI Search service contains one or more indexes that provide persistent
|
|
|
152
152
|
exposes operations on these resources through three main client types.
|
|
153
153
|
|
|
154
154
|
- `SearchClient` helps with:
|
|
155
|
+
|
|
155
156
|
- [Searching](https://docs.microsoft.com/azure/search/search-lucene-query-architecture)
|
|
156
157
|
your indexed documents using [vector queries](https://learn.microsoft.com/azure/search/vector-search-how-to-query),
|
|
157
158
|
[keyword queries](https://learn.microsoft.com/azure/search/search-query-create)
|
|
@@ -163,6 +164,7 @@ exposes operations on these resources through three main client types.
|
|
|
163
164
|
- [Adding, Updating or Deleting Documents](https://docs.microsoft.com/rest/api/searchservice/addupdate-or-delete-documents) documents from an index
|
|
164
165
|
|
|
165
166
|
- `SearchIndexClient` allows you to:
|
|
167
|
+
|
|
166
168
|
- [Create, delete, update, or configure a search index](https://docs.microsoft.com/rest/api/searchservice/index-operations)
|
|
167
169
|
- [Declare custom synonym maps to expand or rewrite queries](https://docs.microsoft.com/rest/api/searchservice/synonym-map-operations)
|
|
168
170
|
|
|
@@ -176,7 +178,7 @@ exposes operations on these resources through three main client types.
|
|
|
176
178
|
|
|
177
179
|
### Documents
|
|
178
180
|
|
|
179
|
-
An item stored inside a search index. The shape of this document is described in the index using `
|
|
181
|
+
An item stored inside a search index. The shape of this document is described in the index using the `fields` property. Each `SearchField` has a name, a datatype, and additional metadata such as if it is searchable or filterable.
|
|
180
182
|
|
|
181
183
|
### Pagination
|
|
182
184
|
|
|
@@ -423,17 +425,26 @@ main();
|
|
|
423
425
|
Text embeddings can be queried using the `vector` search parameter. See [Query vectors](https://learn.microsoft.com/azure/search/vector-search-how-to-query) and [Filter vector queries](https://learn.microsoft.com/azure/search/vector-search-filters) for more information.
|
|
424
426
|
|
|
425
427
|
```js
|
|
426
|
-
const { SearchClient, AzureKeyCredential
|
|
428
|
+
const { SearchClient, AzureKeyCredential } = require("@azure/search-documents");
|
|
427
429
|
|
|
428
|
-
const searchClient = new SearchClient(
|
|
430
|
+
const searchClient = new SearchClient(
|
|
431
|
+
"<endpoint>",
|
|
432
|
+
"<indexName>",
|
|
433
|
+
new AzureKeyCredential("<apiKey>")
|
|
434
|
+
);
|
|
429
435
|
|
|
430
436
|
async function main() {
|
|
431
|
-
const queryVector = [...]
|
|
437
|
+
const queryVector = [...];
|
|
432
438
|
const searchResults = await searchClient.search("*", {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
439
|
+
vectorSearchOptions: {
|
|
440
|
+
queries: [
|
|
441
|
+
{
|
|
442
|
+
kind: "vector",
|
|
443
|
+
vector: queryVector,
|
|
444
|
+
fields: ["descriptionVector"],
|
|
445
|
+
kNearestNeighborsCount: 3,
|
|
446
|
+
},
|
|
447
|
+
],
|
|
437
448
|
},
|
|
438
449
|
});
|
|
439
450
|
for await (const result of searchResults.results) {
|