Skip to content

Commit ad82635

Browse files
committed
fixed paths
1 parent d852322 commit ad82635

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

articles/search/includes/quickstarts/search-get-started-vector-java.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ You should now be logged in to Azure from your local device.
9292

9393
In this section, you create a vector index in Azure AI Search with [SearchIndexClient](/java/api/com.azure.search.documents.indexes.searchindexclient).[createOrUpdateIndex](/java/api/com.azure.search.documents.indexes.searchindexclient#com-azure-search-documents-indexes-searchindexclient-createorupdateindex(com-azure-search-documents-indexes-models-searchindex)). The index schema defines the fields, including the vector field `DescriptionVector`.
9494

95-
1. Create a `CreateIndex.java` file in the `src/main/java/com/azure/search` directory.
95+
1. Create a `CreateIndex.java` file in the `src/main/java/com/example/search` directory.
9696

9797
1. Copy the following code into the file.
9898

99-
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/azure/search/CreateIndex.java" :::
99+
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/example/search/CreateIndex.java" :::
100100

101101
The code file creates the index and defines the index schema, including the vector field `DescriptionVector`.
102102

@@ -133,11 +133,11 @@ Creating and loading the index are separate steps. You created the index schema
133133

134134
In Azure AI Search, the index stores all searchable content, while the search engine executes queries against that index.
135135

136-
1. Create an `UploadDocuments.java` file in the `src/main/java/com/azure/search` directory.
136+
1. Create an `UploadDocuments.java` file in the `src/main/java/com/example/search` directory.
137137

138138
1. Copy the following code into the file.
139139

140-
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/azure/search/UploadDocuments.java" :::
140+
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/example/search/UploadDocuments.java" :::
141141

142142
This code loads a collection of documents. Each document includes the vectorized version of the article's `Description`. This vector enables similarity search, where matching is based on meaning rather than exact keywords.
143143
@@ -182,21 +182,21 @@ The example vector queries are based on two strings:
182182

183183
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.
184184
185-
Create a `QueryVector.java` file in the `src/main/java/com/azure/search` directory and add the code to create the query vector.
185+
Create a `QueryVector.java` file in the `src/main/java/com/example/search` directory and add the code to create the query vector.
186186
187-
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/azure/search/QueryVector.java" :::
187+
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/example/search/QueryVector.java" :::
188188
189189
This code is used in the following sections to perform vector searches. The query vector is created using an embedding model from Azure OpenAI.
190190
191191
## Create a single vector search
192192
193193
The first example demonstrates a basic scenario where you want to find document descriptions that closely match the search string using the [SearchClient](/java/api/com.azure.search.documents.searchclient).[search](/java/api/com.azure.search.documents.searchasyncclient#com-azure-search-documents-searchasyncclient-search(java-lang-string)) and the [VectorQuery](/java/api/com.azure.search.documents.models.vectorquery) and [SearchOptions](/java/api/com.azure.search.documents.models.searchoptions).
194194
195-
1. Create a `SearchSingle.java` file in the `src/main/java/com/azure/search` directory.
195+
1. Create a `SearchSingle.java` file in the `src/main/java/com/example/search` directory.
196196
197197
1. Copy the following code into the file.
198198
199-
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/azure/search/SearchSingle.java" :::
199+
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/example/search/SearchSingle.java" :::
200200
201201
The `vectorQuery` contains the configuration of the vectorized query including the vectorized text of the query input as retrieved through `QueryVector.getVectorList`. `setFields` determines which vector fields are searched and `setKNearestNeighborsCount` specifies the number of nearest neighbors to return.
202202
@@ -229,11 +229,11 @@ The first example demonstrates a basic scenario where you want to find document
229229
230230
You can add filters, but the filters are applied to the nonvector content in your index. In this example, the filter applies to the `Tags` field to filter out any hotels that don't provide free Wi-Fi. This search uses [SearchClient](/java/api/com.azure.search.documents.searchclient).[SearchClient](/java/api/com.azure.search.documents.searchclient) and [SearchOptions](/java/api/com.azure.search.documents.models.searchoptions).
231231
232-
1. Create a `SearchSingleWithFilter.java` file in the `src/main/java/com/azure/search` directory.
232+
1. Create a `SearchSingleWithFilter.java` file in the `src/main/java/com/example/search` directory.
233233
234234
1. Copy the following code into the file.
235235
236-
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/azure/search/SearchSingleWithFilter.java" :::
236+
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/example/search/SearchSingleWithFilter.java" :::
237237
238238
This code has the same search functionality as the previous search with a post-processing exclusion filter added for hotels with `free wifi`.
239239
@@ -258,11 +258,11 @@ You can add filters, but the filters are applied to the nonvector content in you
258258
259259
You can specify a geospatial filter to limit results to a specific geographic area. In this example, the filter limits results to hotels within 300 kilometers of Washington D.C. (coordinates: `-77.03241 38.90166`). Geospatial distances are always in kilometers. This search uses [SearchClient](/java/api/com.azure.search.documents.searchclient).[SearchClient](/java/api/com.azure.search.documents.searchclient) and [SearchOptions](/java/api/com.azure.search.documents.models.searchoptions).
260260
261-
1. Create a `SearchSingleWithFilterGeo.java` file in the `src/main/java/com/azure/search` directory.
261+
1. Create a `SearchSingleWithFilterGeo.java` file in the `src/main/java/com/example/search` directory.
262262
263263
1. Copy the following code into the file.
264264
265-
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/azure/search/SearchSingleWithFilterGeo.java" :::
265+
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/example/search/SearchSingleWithFilterGeo.java" :::
266266
267267
1. Build and run the file:
268268
@@ -290,11 +290,11 @@ Hybrid search consists of keyword queries and vector queries in a single search
290290
291291
This search uses [SearchClient](/java/api/com.azure.search.documents.searchclient).[SearchClient](/java/api/com.azure.search.documents.searchclient) and [SearchOptions](/java/api/com.azure.search.documents.models.searchoptions).
292292
293-
1. Create a `SearchHybrid.java` file in the `src/main/java/com/azure/search` directory.
293+
1. Create a `SearchHybrid.java` file in the `src/main/java/com/example/search` directory.
294294
295295
1. Copy the following code into the file.
296296
297-
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/azure/search/SearchHybrid.java" :::
297+
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/example/search/SearchHybrid.java" :::
298298
299299
1. Build and run the file:
300300
@@ -422,11 +422,11 @@ Here's the last query in the collection to create extend the semantic hybrid sea
422422
423423
This search uses [SearchClient](/java/api/com.azure.search.documents.searchclient).[SearchClient](/java/api/com.azure.search.documents.searchclient) and [SearchOptions](/java/api/com.azure.search.documents.models.searchoptions).
424424
425-
1. Create a `SearchSemanticHybrid.java` file in the `src/main/java/com/azure/search` directory.
425+
1. Create a `SearchSemanticHybrid.java` file in the `src/main/java/com/example/search` directory.
426426
427427
1. Copy the following code into the file.
428428
429-
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/azure/search/SearchSemanticHybrid.java" :::
429+
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/example/search/SearchSemanticHybrid.java" :::
430430
431431
1. Build and run the file:
432432
@@ -495,11 +495,11 @@ You can find and manage resources in the Azure portal by using the **All resourc
495495
496496
If you want to keep the search service, but delete the index and documents, you can delete the index programmatically.
497497
498-
1. Create a `DeleteIndex.java` file in the `src/main/java/com/azure/search` directory.
498+
1. Create a `DeleteIndex.java` file in the `src/main/java/com/example/search` directory.
499499
500500
1. Add the code to delete the index.
501501
502-
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/azure/search/DeleteIndex.java" :::
502+
:::code language="java" source="~/azure-search-java-samples/vector-quickstart/src/main/java/com/example/search/DeleteIndex.java" :::
503503
504504
1. Build and run the file:
505505

0 commit comments

Comments
 (0)