Skip to content

Conversation

mattgotteiner
Copy link
Collaborator

Purpose

  • Upgrade Search SDK and add support for query rewriting by setting AZURE_SEARCH_QUERY_REWRITING

Does this introduce a breaking change?

When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.

[ ] Yes
[X] No

Does this require changes to learn.microsoft.com docs?

This repository is referenced by this tutorial
which includes deployment, settings and usage instructions. If text or screenshot need to change in the tutorial,
check the box below and notify the tutorial author. A Microsoft employee can do this for you if you're an external contributor.

[ ] Yes
[X] No

Type of change

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for query rewriting in the search functionality by upgrading the Search SDK and integrating the new AZURE_SEARCH_QUERY_REWRITING environment variable. Key changes include updates to documentation, test coverage for query rewriting, and the necessary modifications in both backend and frontend code to propagate the new query rewriting option.

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/deploy_features.md Added documentation for enabling query rewriting (spelling typo in env variable).
tests/test_chatapproach.py Added test to validate query rewriting behavior.
app/frontend/src/components/Settings/Settings.tsx Updated settings to allow toggling query rewriting.
app/backend/app.py, config.py Integrated new config variable for query rewriting.
app/frontend/src/api/models.ts, various pages Propagated query rewriting option through API models and page states.
app/backend/approaches/* Updated search methods to pass through the query rewriting flag.

Copy link

Check Broken URLs

We have automatically detected the following broken URLs in your files. Review and fix the paths to resolve this issue.

Check the file paths and associated broken URLs inside them.
For more details, check our Contributing Guide.

File Full Path Issues
data/Contoso_Electronics_Company_Overview.md
#LinkLine Number
1http://www.contoso.com48

Copy link
Collaborator

@pamelafox pamelafox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to test it fully since I dont have a search service in the right region, but its now working for existing environments, so that's good. Code looks good.

@mattgotteiner mattgotteiner merged commit 62f8b58 into Azure-Samples:main Mar 19, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants