The following screenshot shows options in the wizard, juxtaposed with a rendered page in the app. The wizard gives you options for configuring how much information is included in a suggestion. Suggestions are enabled on specific field definitions. Based on keystroke inputs provided by the user, the search service returns a list of "completed" query strings that can be selected as the input. Typeahead functionality is available in the form of autocomplete and query suggestions. You'll see a list of all fields that are attributed as filterable and facetable in the index.Īccept the current selection of faceted fields and continue to the next page. In the wizard, select the Sidebar tab at the top of the page. Fields that qualify for faceted navigation have "filterable: true" and "facetable: true" attributes. Look for the Index definition (JSON) link in each index's overview page. You can view the full index schema in the portal. Across categories, selecting multiple filters narrows results. Within a category, selecting multiple filters expands the results (for example, selecting Seattle and Bellevue within City). In Azure Cognitive Search, faceted navigation is a cumulative filtering experience. Facets are based on filterable and facetable fields, as expressed in the index schema. The search service supports faceted navigation, which is often rendered as a sidebar. In Description, choose a field that provides details that might help someone decide whether to click through to that particular document. In this sample, the listing ID is a reasonable selection. In Title, choose a field that conveys the uniqueness of each document. If your index doesn't have images, leave this field blank. This sample happens to include image thumbnails in the form of URL-addressed images stored in a field called thumbnail. In Thumbnail, choose the thumbnail field in the realestate-us-sample index. Backing each of these elements is a field in your index that provides the data. The wizard provides a basic layout for rendered search results that includes space for a thumbnail image, a title, and description. This step is optional, but your local web app won't connect to the remote index without it. On the first wizard page, select Enable Cross Origin Resource Sharing (CORS) to add CORS support to your index definition. On the index page, at the top, select Create demo app (preview) to start the wizard. Sign in to the Azure portal with your Azure account.įind your search service and on the Overview page, from the links on the middle of the page, select Indexes.Ĭhoose realestate-us-sample-index from the list of existing indexes. When the index is ready to use, move on to the next step. To create the index used in this exercise, run the Import data wizard, choosing the realestate-us-sample data source. This quickstart uses the built-in Real Estate sample data and index because it has thumbnail images (the wizard supports adding images to the results page). Microsoft Edge (latest version) or Google Chrome.Ī search index to use as the basis of your generated application. You can use a free service for this quickstart. Create a service or find an existing service under your current subscription. Create an account for free.Īn Azure Cognitive Search service. Prerequisitesīefore you begin, have the following prerequisites in place:Īn Azure account with an active subscription. Production apps should include security, error handling, and hosting logic that the demo app doesn't provide. A default app can include a search bar, results area, sidebar filters, and typeahead support.Ī demo app can help you visualize how an index will function in a client app, but it isn't intended for production scenarios. Depending on its configuration, the generated app is operational on first use, with a live read-only connection to an index on your search service. In this quickstart, you'll use the Azure portal's Create demo app wizard to generate a downloadable, "localhost"-style web app that runs in a browser.
0 Comments
Leave a Reply. |