You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/includes/quickstarts/search-get-started-vector-python.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -255,7 +255,7 @@ In Azure AI Search, the index stores all searchable content, while the search en
255
255
"@search.action": "mergeOrUpload",
256
256
"HotelId": "1",
257
257
"HotelName": "Stay-Kay City Hotel",
258
-
"Description": "This classic hotel is fully-refurbished and ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Times Square and the historic centre of the city, as well as other places of interest that make New York one of America's most attractive and cosmopolitan cities.",
258
+
"Description": "This classic hotel is fully-refurbished and ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Times Square and the historic center of the city, as well as other places of interest that make New York one of America's most attractive and cosmopolitan cities.",
259
259
"DescriptionVector": [-0.048865054,-0.020307425,
260
260
# <truncated>
261
261
-0.018120624,-0.012772904],
@@ -354,13 +354,13 @@ The example vector queries are based on two strings:
354
354
355
355
The vector query string is semantically similar to the search string, but it includes terms that don't exist in the search index. If you do a keyword search for `quintessential lodging near running trails, eateries, retail`, results are zero. We use this example to show how you can get relevant results even if there are no matching terms.
356
356
357
-
1. Find the cell below section titled "Create the vector query string" and execute the cell. This loads the `vector` variable with the vectorized query data required to run all of the searches in the next sections.
357
+
- Find the cell below section titled "Create the vector query string" and execute the cell. This loads the `vector` variable with the vectorized query data required to run all of the searches in the next sections.
358
358
359
359
### Single vector search
360
360
361
361
The first example demonstrates a basic scenario where you want to find document descriptions that closely match the search string.
362
362
363
-
1. Find the cell below section titled "Single vector search" and execute the cell. This block contains the request to query the search index.
363
+
- Find the cell below section titled "Single vector search" and execute the cell. This block contains the request to query the search index.
364
364
365
365
```python
366
366
# IMPORTANT: Before you run this code, make sure the documents were successfully
@@ -514,7 +514,7 @@ You can add filters, but the filters are applied to the nonvector content in you
514
514
HotelName: Swirling Currents Hotel
515
515
Score: 0.602634072303772
516
516
City/State: Arlington, VA
517
-
Description: Spacious rooms, glamorous suites and residences, rooftop pool, walking access to shopping, dining, entertainment and the city center. Each room comes equipped with a microwave, a coffee maker and a minifridge. In-room entertainment includes complimentary W-Fi and flat-screen TVs.
517
+
Description: Spacious rooms, glamorous suites and residences, rooftop pool, walking access to shopping, dining, entertainment and the city center. Each room comes equipped with a microwave, a coffee maker and a minifridge. In-room entertainment includes complimentary Wi-Fi and flat-screen TVs.
518
518
```
519
519
520
520
### Hybrid search
@@ -524,7 +524,7 @@ Hybrid search consists of keyword queries and vector queries in a single search
524
524
-**Search string**: `historic hotel walk to restaurants and shopping`
525
525
-**Vector query string** (vectorized into a mathematical representation): `quintessential lodging near running trails, eateries, retail`
526
526
527
-
1. Find the cell below section titled "Hybrid search" and execute the cell. This block contains the request to query the search index.
527
+
- Find the cell below section titled "Hybrid search" and execute the cell. This block contains the request to query the search index.
528
528
529
529
```python
530
530
if vector:
@@ -590,7 +590,7 @@ Hybrid search consists of keyword queries and vector queries in a single search
590
590
- Score: 0.0317460335791111
591
591
HotelId: 49
592
592
HotelName: Swirling Currents Hotel
593
-
Description: Spacious rooms, glamorous suites and residences, rooftop pool, walking access to shopping, dining, entertainment and the city center. Each room comes equipped with a microwave, a coffee maker and a minifridge. In-room entertainment includes complimentary W-Fi and flat-screen TVs.
593
+
Description: Spacious rooms, glamorous suites and residences, rooftop pool, walking access to shopping, dining, entertainment and the city center. Each room comes equipped with a microwave, a coffee maker and a minifridge. In-room entertainment includes complimentary Wi-Fi and flat-screen TVs.
594
594
Category: Suite
595
595
Tags: ['air conditioning', 'laundry service', '24-hour front desk service']
596
596
@@ -677,7 +677,7 @@ Hybrid search consists of keyword queries and vector queries in a single search
677
677
678
678
Here's the last query in the collection. This hybrid query with semantic ranking is filtered to show only the hotels within a 500-kilometer radius of Washington D.C. You can set `vectorFilterMode` to null, which is equivalent to the default (`preFilter` for newer indexes and `postFilter` for older ones).
679
679
680
-
1. Find the cell below section titled "Semantic hybrid search" and execute the cell. This code block contains the request to query the search index.
680
+
- Find the cell below section titled "Semantic hybrid search" and execute the cell. This code block contains the request to query the search index.
681
681
682
682
```python
683
683
if semantic_hybrid_query_vector:
@@ -730,7 +730,7 @@ Here's the last query in the collection. This hybrid query with semantic ranking
730
730
Re-ranker Score: 2.6550590991973877
731
731
HotelId: 49
732
732
HotelName: Swirling Currents Hotel
733
-
Description: Spacious rooms, glamorous suites and residences, rooftop pool, walking access to shopping, dining, entertainment and the city center. Each room comes equipped with a microwave, a coffee maker and a minifridge. In-room entertainment includes complimentary W-Fi and flat-screen TVs.
733
+
Description: Spacious rooms, glamorous suites and residences, rooftop pool, walking access to shopping, dining, entertainment and the city center. Each room comes equipped with a microwave, a coffee maker and a minifridge. In-room entertainment includes complimentary Wi-Fi and flat-screen TVs.
734
734
Category: Suite
735
735
- Score: 0.03279569745063782
736
736
Re-ranker Score: 2.599761724472046
@@ -748,7 +748,7 @@ Here's the last query in the collection. This hybrid query with semantic ranking
748
748
Re-ranker Score: 2.2718777656555176
749
749
HotelId: 1
750
750
HotelName: Stay-Kay City Hotel
751
-
Description: This classic hotel is fully-refurbished and ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Times Square and the historic centre of the city, as well as other places of interest that make New York one of America's most attractive and cosmopolitan cities.
751
+
Description: This classic hotel is fully-refurbished and ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Times Square and the historic center of the city, as well as other places of interest that make New York one of America's most attractive and cosmopolitan cities.
0 commit comments