|
28 | 28 | import java.util.List; |
29 | 29 |
|
30 | 30 | /** |
31 | | - * This scenario assumes an existing search solution and uses a pre-population data source with sample data set |
32 | | - * For more information visit Azure Cognitive Search Sample Data: |
33 | | - * https://docs.microsoft.com/en-us/samples/azure-samples/azure-search-sample-data/azure-search-sample-data/ |
| 31 | + * This scenario assumes an existing search solution and uses a pre-population data source with sample data set For more |
| 32 | + * information visit Azure Cognitive Search Sample Data: https://docs.microsoft.com/en-us/samples/azure-samples/azure-search-sample-data/azure-search-sample-data/ |
34 | 33 | */ |
35 | 34 | public class LifecycleSetupExample { |
36 | 35 | /** |
37 | | - * From the Azure portal, get your Azure Cognitive Search service URL and API admin key, |
38 | | - * and set the values of these environment variables: |
| 36 | + * From the Azure portal, get your Azure Cognitive Search service URL and API admin key, and set the values of these |
| 37 | + * environment variables: |
39 | 38 | */ |
40 | | - private static final String ENDPOINT = Configuration.getGlobalConfiguration().get("AZURE_COGNITIVE_SEARCH_ENDPOINT"); |
41 | | - private static final String ADMIN_KEY = Configuration.getGlobalConfiguration().get("AZURE_COGNITIVE_SEARCH_ADMIN_KEY"); |
| 39 | + private static final String ENDPOINT = Configuration.getGlobalConfiguration() |
| 40 | + .get("AZURE_COGNITIVE_SEARCH_ENDPOINT"); |
| 41 | + private static final String ADMIN_KEY = Configuration.getGlobalConfiguration() |
| 42 | + .get("AZURE_COGNITIVE_SEARCH_ADMIN_KEY"); |
42 | 43 |
|
43 | 44 | // Using hard coded connection string to pre-populated Cosmos DB database with sample data set |
44 | | - // For more information visit https://docs.microsoft.com/en-us/samples/azure-samples/azure-search-sample-data/azure-search-sample-data/ |
45 | | - private static final String COSMOS_CONNECTION_STRING = "AccountEndpoint=https://hotels-docbb.documents.azure.com:443/;AccountKey=4UPsNZyFAjgZ1tzHPGZaxS09XcwLrIawbXBWk6IixcxJoSePTcjBn0mi53XiKWu8MaUgowUhIovOv7kjksqAug==;Database=SampleData"; |
| 45 | + // For more information visit https://github.com/Azure-Samples/azure-search-sample-data |
| 46 | + private static final String COSMOS_CONNECTION_STRING = Configuration.getGlobalConfiguration() |
| 47 | + .get("AZURE_COSMOS_CONNECTION_STRING"); |
46 | 48 | private static final String COSMOS_COLLECTION_NAME = "hotels"; |
47 | 49 |
|
48 | 50 | private static final String INDEX_NAME = "hotels-sample-index1"; |
|
0 commit comments