Skip to content

Commit

Permalink
Add missing QueryType for Semantic query (#38992)
Browse files Browse the repository at this point in the history
  • Loading branch information
alzimmermsft authored Feb 28, 2024
1 parent 1c02a26 commit 68b57a8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.azure.search.documents.models.QueryCaption;
import com.azure.search.documents.models.QueryCaptionResult;
import com.azure.search.documents.models.QueryCaptionType;
import com.azure.search.documents.models.QueryType;
import com.azure.search.documents.models.SearchOptions;
import com.azure.search.documents.models.SearchResult;
import com.azure.search.documents.models.SemanticSearchOptions;
Expand Down Expand Up @@ -244,6 +245,7 @@ public static void semanticHybridSearch(SearchClient searchClient) {
.setFields("DescriptionVector");

SearchOptions searchOptions = new SearchOptions()
.setQueryType(QueryType.SEMANTIC)
.setVectorSearchOptions(new VectorSearchOptions()
.setQueries(vectorizableQuery))
.setSemanticSearchOptions(new SemanticSearchOptions()
Expand Down

0 comments on commit 68b57a8

Please sign in to comment.