When query outcomes are unexpected, you can try these query modifications to see if results improve:Ĭhange searchMode=any (default) to searchMode=all to require matches on all criteria instead of any of the criteria. For example, you might find that some results appear to be duplicates, or a result that should appear near the top is positioned lower in the results. Occasionally, the substance and not the structure of results are unexpected. Sample indexes that support images in the results include the realestate-sample-us demo (a built-in sample dataset that you can build easily in the Import Data wizard), and the New York City Jobs demo app. If want to include image files in a result, such as a product photo or logo, store them outside of Azure Cognitive Search, but include a field in your index to reference the image URL in the search document. "select": "HotelId, HotelName, Description, Rating, Address/City" For the built-in hotels-sample index, it might be the "select" fields in the following example: POST /indexes/hotels-sample-index/docs/search?api-version= On an e-commerce site, it might be a product name, description, brand, color, size, price, and rating. A field must be attributed as "retrievable" in the index to be included in a result.įields that work best include those that contrast and differentiate among documents, providing sufficient information to invite a click-through response on the part of the user. On a query request, append $select= to specify which fields include in the response. While a search document might consist of a large number of fields, typically only a few are needed to represent each document in the result set. Results are tabular, composed of fields of either all "retrievable" fields, or limited to just those fields specified in the $select parameters. Highlighting of terms within a result, matching on either the whole or partial term in the body.Number of results in the response (up to 50, by default).Count of matches found in the index for the query.The structure of a response is determined by parameters in the query itself, as described in Search Documents (REST) or SearchResults Class (Azure for. This article explains how to work with a query response in Azure Cognitive Search.
0 Comments
Leave a Reply. |