Azure Cognitive Search: queryLanguage Parameter Not Affecting Semantic Search Results

120 views Asked by At

I am working with Azure Cognitive Search and have set up an index with content in both English and German. I'm attempting to perform semantic search with different queryLanguage parameters to retrieve language-specific results. However, I'm encountering an issue where the queryLanguage parameter does not seem to influence the search results, and I'm getting identical results for different language settings.

Here are two example queries I'm using:

Query 1:

{
  "count": true,
  "search": "auto",
  "queryType": "semantic",
  "queryLanguage": "de-de",
  "semanticConfiguration": "default"
}

Query 2:

{
  "count": true,
  "search": "auto",
  "queryType": "semantic",
  "queryLanguage": "en-us",
  "semanticConfiguration": "default",
  "select": "id, chunk_id, content"
}

Despite specifying different queryLanguage values, the search results remain the same. I expected that changing the queryLanguage parameter would affect the results to reflect the language-specific content. How can I make the queryLanguage parameter work correctly in semantic search to retrieve language-specific results?

Any guidance or insights into configuring the queryLanguage parameter for semantic search in multilingual scenarios would be greatly appreciated.

Additional Information:

  • My index field stores content in both English and German.

Expected Behavior: The queryLanguage parameter should influence the semantic search results, ensuring that queries in distinct languages return language-appropriate results. In this case, German and English queries should yield different results based on the language of the content.

Actual Behavior: The queryLanguage parameter does not appear to affect the semantic search results, resulting in identical outcomes regardless of the specified queryLanguage.

1

There are 1 answers

2
Dan Gøran Lunde On

Have you defined language analyzers for English and German? Or are you simply indexing random content that contain either language?

It is not clear what you do. A concrete example would help.