Skip to content

Commit

Permalink
Update azure-search readme (Azure#281)
Browse files Browse the repository at this point in the history
* update azure-search readme

* update readme

* remove exclusions for md files
  • Loading branch information
tamirkamara authored and LizaShak committed Nov 18, 2019
1 parent 9a8d0e3 commit 79ff776
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 56 deletions.
2 changes: 2 additions & 0 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ known_content_issues:
- ['sdk/storage/azure-storage-file-datalake/swagger/README.md', '#3113']
- ['sdk/storage/azure-storage-queue/swagger/README.md', '#3113']
- ['sdk/storage/azure-storage-file-share/swagger/README.md', '#3113']
- ['sdk/search/azure-search/src/test/README.md', '#3113']
- ['sdk/search/open-api/readme.md', '#3113']
package_indexing_exclusion_list:
- azure-loganalytics-sample
- azure-applicationinsights-query-sample
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ jobs:
pip install doc-warden
ward scan -d $(Build.SourcesDirectory) -c $(Build.SourcesDirectory)/eng/.docsettings.yml
displayName: 'Verify Readmes'
enabled: false
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
# ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR
Expand Down
105 changes: 52 additions & 53 deletions sdk/search/azure-search/README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,59 @@
# Java SDK for Azure Search
# Azure cognitive search client library for Java

This is the Java SDK for [Azure Search](https://docs.microsoft.com/en-us/rest/api/searchservice/). Azure Search is a fully managed cloud search service that provides a rich search experience to custom applications. One way to add search capability is through a REST API, with operations that create and manage indexes, load data, implement search features, execute queries, and handle results.
This is the Java client library for [Azure Cognitive Search](https://docs.microsoft.com/en-us/rest/api/searchservice/).
Azure Cognitive Search is a fully managed cloud search service that provides a rich search experience to custom applications.
This library provides an easy (native) way for a Java developer to interact with the service to accomplish tasks like: create and manage indexes, load data, implement search features, execute queries, and handle results.

[Source code][source_code] | [Package (Maven)][package] | [API reference documentation][api_documentation]
| [Product documentation][search_docs] | [Samples][samples]

## Getting started

### Prerequisites

- Java Development Kit (JDK) with version 8 or above
- [Azure subscription][azure_subscription]
- An instance of [Cognitive search service][search]

### Adding the package to your product

[//]: # ({x-version-update-start;com.azure:azure-search;current})

```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-search</artifactId>
<version>1.0.0-preview.2</version>
</dependency>
```

[//]: # ({x-version-update-end})

## Key concepts

Azure Search has the concepts of search services and indexes and documents, where a search service contains one or more indexes that provides persistent storage of searchable data, and data is loaded in the form of JSON documents. Data is typically pushed to an index from an external data source, but if you use an indexer, it's possible to crawl a data source to extract and load data into an index.
Azure Cognitive Search has the concepts of search services and indexes and documents, where a search service contains one or more indexes that provides persistent storage of searchable data, and data is loaded in the form of JSON documents. Data is typically pushed to an index from an external data source, but if you use an indexer, it's possible to crawl a data source to extract and load data into an index.

There are several types of operations that can be executed against the service:

* [Index management operations](https://docs.microsoft.com/en-us/rest/api/searchservice/index-operations). Create, delete, update, or configure a search index.

* [Document operations](https://docs.microsoft.com/en-us/rest/api/searchservice/document-operations). Add, update, or delete documents in the index, query the index, or look up specific documents by ID.

* [Indexer operations](https://docs.microsoft.com/en-us/rest/api/searchservice/indexer-operations). Automate aspects of an indexing operation by configuring a data source and an indexer that you can schedule or run on demand. This feature is supported for a limited number of data source types.

* [Skillset operations](https://docs.microsoft.com/en-us/rest/api/searchservice/skillset-operations). Part of a cognitive search workload, a skillset defines a series of enrichment processing. A skillset is consumed by an indexer.

* [Synonym map operations](https://docs.microsoft.com/en-us/rest/api/searchservice/synonym-map-operations). A synonym map is service-level resource that containers user-defined synonyms. This resource is maintained independently from search indexes. Once uploaded, you can point any searchable field to the synonym map (one per field).

A separate REST API is provided for service administration, including provisioning the service or altering capacity. For more information, see [Azure Search Management REST](https://docs.microsoft.com/en-us/rest/api/searchmanagement/index).
A separate REST API is provided for service administration, including provisioning the service or altering capacity. For more information, see [Azure Cognitive Search Management REST](https://docs.microsoft.com/en-us/rest/api/searchmanagement/index).

## Using the SDK
## Using the library

The APIs documented in this section provide access to operations on search data, such as index creation and population, document upload, and queries. When calling APIs, keep the following points in mind:

* All APIs will be issued over HTTPS (on the default port 443).

* Your search service is uniquely identified by a fully-qualified domain name (for example: `mysearchservice.search.windows.net`).
* All requests must include an `api-key` that was generated for the Search service you provisioned. Having a valid key establishes trust, on a per request basis, between the application sending the request and the service that handles it.
* Requests can optionally specify an `api-version`. The default value matches the version of the current service release: `2019-05-06`.
* You will need to provide `index name`and the `cognitive search service name` which is the URL of the Azure Cognitive Search service you provisioned: `https://<yourService>.search.windows.net`.

* All SDK requests must include an `api-key` that was generated for the Search service you provisioned. Having a valid key establishes trust, on a per request basis, between the application sending the request and the service that handles it.

* SDK requests can optionally specify an `api-version`. The default value matches the version of the current service release: `2019-05-06`.

* You will need to provide `index name`and the `search service name` which is the URL of the Azure Search service you provisioned: `https://<yourService>.search.windows.net`.

## This library is built using

* JDK / JRE 1.8
* Microsoft Azure - adal4j 1.3.0
* Junit 4.12

## Building the SDK

1. Clone this repo
2. In [IntelliJ](https://www.jetbrains.com/idea/), import the project by opening the client pom - [pom.client.xml](../../../pom.client.xml) it will open all the SDKs, including the search one and will make sure all dependencies are met. For contributing to Search specifically, select `...\azure-sdk-for-java-pr\sdk\search\pom.service.xml`.
* Check "Search for projects recursively" and "Import Maven projects automatically" checkboxes if they are not checked by default.
* In JDK for importer, select 1.8. Make sure to have JDK 1.8 installed and included in project settings.
* For profiles, check "javadoc-doclet-compatibility".
* For Maven projects to import, check com.azure:azure-search-service-parent:1.0.0.
* For project SDK, select Java SDK 1.8.
3. Build module azure-search, and run the samples

## Samples
## Examples

* [Using autocomplete to expand a query from index contents](/sdk/search/azure-search/src/samples/java/com/azure/search/AutoCompleteExample.java)
* [Creating a new index](/sdk/search/azure-search/src/samples/java/com/azure/search/CreateIndexExample.java)
Expand All @@ -67,23 +69,15 @@ The APIs documented in this section provide access to operations on search data,
* [Creating a synonym map for an index](/sdk/search/azure-search/src/samples/java/com/azure/search/SynonymMapsCreateExample.java)
* [Creating skillsets](/sdk/search/azure-search/src/samples/java/com/azure/search/CreateSkillsetExample.java)

## How to provide feedback
## Troubleshooting

See our [Contribution Guidelines](./.github/CONTRIBUTING.md).
### General

## How to get support
When you interact with Azure Cognitive Search using this Java client library, errors returned by the service correspond to the same HTTP status codes returned for [REST API][rest_api] requests. For example, if you try to retrieve a document that doesn't exist in your index, a `404` error is returned, indicating `Not Found`.

See our [Support Guidelines](./.github/SUPPORT.md)
## Next steps

## Known issues

TBD

## FAQ

### How to run unit tests

Please see the [Test Framework documentation](/sdk/search/azure-search/src/test)
TODO: Add a java quickstart

## Contributing

Expand All @@ -95,9 +89,14 @@ If you would like to become an active contributor to this project please follow
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## Run style check locally

Style check runs as part of Continuous Integration (CI) pipeline. Running it locally allows you to verify the style rules in an isolated way and quickly iterate on them, rather than having to wait for a build agent to free up to run all the steps.
Navigate to `..\azure-sdk-for-java-pr`, run:

`mvn -f pom.client.xml -DskipTests -Dgpg.skip spotbugs:check checkstyle:checkstyle-aggregate --projects com.azure.search:azure-search-data,com.azure:azure-client-sdk-parent --also-make`
<!-- LINKS -->
[api_documentation]: https://aka.ms/java-docs
[search]: https://azure.microsoft.com/en-us/services/search/
[search_docs]: https://docs.microsoft.com/en-us/azure/search/
[azure_subscription]: https://azure.microsoft.com/free
[maven]: https://maven.apache.org/
[package]: https://search.maven.org/artifact/com.azure/azure-search
[samples]: src/samples/java/com/azure/search
[source_code]: src

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java/sdk/search/azure-search/README.png)
2 changes: 0 additions & 2 deletions sdk/search/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ trigger:
paths:
include:
- sdk/search/
exclude:
- sdk/search/azure-search/*.md

pr:
branches:
Expand Down

0 comments on commit 79ff776

Please sign in to comment.