4. 大家都有的限制-Request
Maximum of 16 MB per request
Maximum 8 KB URL length
Maximum 1000 documents per batch of index uploads, merges, or deletes.
Maximum 25 characters of text in Suggest API request, minimum 3 characters
Maximum 32 fields in $orderby clause
Maximum search term size is 32766 bytes (32 KB minute 2 bytes) of UTF-8 encoded
text
5. 大家都有的限制-Response
Maximum 1000 documents returned per page of search results
Maximum 10 suggestions returned per Suggest API request
7. 兩種操作
There are two types of actions that can be executed against the Azure Search Service:
• Index Management: This includes administrative tasks that are executed against a search
service or search index.
• Document Actions: These actions query and manage the corpus for a given index
8. 索引 操作
CREATE -> POST /indexes?api-version=2014-07-31-Preview
UPDATE -> PUT /indexes/[index name]?api-version=2014-07-31-Preview
DELETE -> DELETE /indexes/[index name]?api-version=2014-07-31-Preview
GET -> GET /indexes/[index name]?api-version=2014-07-31-Preview
LIST -> GET /indexes?api-version=2014-07-31-Preview
9. 文件 操作
DML -> POST /indexes/[index name]/docs/index?api-version=2014-07-31-Preview
GET -> GET /indexes/[index name]/docs?[query parameters]
Lookup -> GET /indexes/[index name]/docs/[key]?[query parameters]
DML 操作是用JSON欄位 @search.action做定義
"@search.action": "upload (default) | merge | mergeOrUpload | delete"
19. Begin…
Need service URL and API Key before start
Cannot rename service name
Requests must include the api-version
One service include two API Key – Manage(2) and Query (50) .
Index column attribute will affect your query
20. Free trial Limite
Storage limit 50MB
Documents limit 10000
Only 3 index
They don't ensure service usable
21. Request Limit
Maximum of 16 MB per request
Maximum 8 KB URL length
Maximum 1000 documents per batch of index uploads, merges, or deletes.
Maximum 25 characters of text in Suggest API request, minimum 3 characters
Maximum 32 fields in $orderby clause
Maximum search term size is 32766 bytes (32 KB minute 2 bytes) of UTF-8 encoded
text
22. Response Limit
Maximum 1000 documents returned per page of search results
Maximum 10 suggestions returned per Suggest API request
24. Two Operating
There are two types of actions that can be executed against the Azure Search Service:
• Index Management: This includes administrative tasks that are executed against a search service or search in
• Document Actions: These actions query and manage the corpus for a given index
25. Index
CREATE -> POST /indexes?api-version=2014-07-31-Preview
UPDATE -> PUT /indexes/[index name]?api-version=2014-07-31-Preview
DELETE -> DELETE /indexes/[index name]?api-version=2014-07-31-Preview
GET -> GET /indexes/[index name]?api-version=2014-07-31-Preview
LIST -> GET /indexes?api-version=2014-07-31-Preview
26. Document
DML -> POST /indexes/[index name]/docs/index?api-version=2014-07-31-Preview
GET -> GET /indexes/[index name]/docs?[query parameters]
Lookup -> GET /indexes/[index name]/docs/[key]?[query parameters]
DML operating is use JSON column @search.action to declare action
"@search.action": "upload (default) | merge | mergeOrUpload | delete"
27. Service name conventions
Must be between 2 and 15 characters
Must start with a letter or number, followed by zero or more letters, numbers or
dashes ('-')
Must be lowercase
Consecutive dashes are not allowed
Second character cannot be a dash
29. Index name conventions
Must be between 2 and 128 characters total
Must start with a letter or number, followed by zero or more letters, numbers
or dashes ('-')
Must be lowercase
Consecutive dashes are not allowed
30. Field name conventions
Must be between 1 and 128 characters
Can contain letters, numbers, and underscore ('_')
Must start with a letter
Cannot start with "azureSearch"
31. Document key naming conventions
Can contain letters, numbers, underscore ('_'), dashes ('-'), or equal sign ('=')
Cannot start with an underscore ('_')
If you use compound keys and need a separator, we recommend using '-', '_',
or '='.
If the keys in your source data contain characters other than the above, we
recommend encoding them using a URL-safe variant of Base64. For example,
in .NET you can use the HttpServerUtility.UrlTokenEncode method for this
purpose.
Cannot contain backslash (''), slash ('/'), or dot ('.')
If you use compound keys and need a separator, we recommend using |.
32. Tips
Increasing queries per second (QPS) or achieving high availability is done by
adding replicas
high availability need last three replicas
Replicas almost used in application
33. C# Azure Search
Using HttpClient
Header need have api-key
Use HttpRequestMessage send content
Data only use JSON
More example: https://azuresearchadventureworksdemo.codeplex.com/
You may need use NuGet console to updating MVC reference
Update-package -reinstall Microsoft.AspNet.Mvc
Hinweis der Redaktion
Prototype features could change or disappear by the general release. In contrast, the features in a locked release are considered stable and will not change with the exception of small backward-compatible fixes and enhancements. We recommend against writing code that takes a dependency on prototype versions.
Although each request has an api-version, we recommend that you use the same version for all API requests. This is especially true when new API versions introduce attributes or operations that are not recognized by previous versions. In broad terms, mixing API versions can have unintended consequences and should be avoided.
Most service applications have a built-in need for more replicas rather than partitions, as most applications that utilize search can fit easily into a single partition that can support up to 15 million documents.
Prototype features could change or disappear by the general release. In contrast, the features in a locked release are considered stable and will not change with the exception of small backward-compatible fixes and enhancements. We recommend against writing code that takes a dependency on prototype versions.
Although each request has an api-version, we recommend that you use the same version for all API requests. This is especially true when new API versions introduce attributes or operations that are not recognized by previous versions. In broad terms, mixing API versions can have unintended consequences and should be avoided.
Most service applications have a built-in need for more replicas rather than partitions, as most applications that utilize search can fit easily into a single partition that can support up to 15 million documents.