Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Configured main index search field names in environment variables #1198

Merged
merged 6 commits into from
Aug 2, 2024

Conversation

Prasanjeet-Microsoft
Copy link
Contributor

@Prasanjeet-Microsoft Prasanjeet-Microsoft commented Aug 1, 2024

Purpose

Configured main index search field names in environment variables to save the user needing to modify code?

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

Change the value of index search field names whatever you want to keep in environment variables from .env file or using azd env set command from VS code powershell terminal. Below are the env variables that has been added for index search field names:

AZURE_SEARCH_FIELDS_ID
AZURE_SEARCH_CONTENT_COLUMN
AZURE_SEARCH_CONTENT_VECTOR_COLUMN
AZURE_SEARCH_TITLE_COLUMN
AZURE_SEARCH_FIELDS_METADATA
AZURE_SEARCH_SOURCE_COLUMN
AZURE_SEARCH_CHUNK_COLUMN
AZURE_SEARCH_OFFSET_COLUMN

After changing/setting the values of above environment variables, run the below commands from VS code powershell terminal:

--azd auth login
--azd up

After successful deployment, delete the existing search index from search service and all the files from storage account container. And then upload the all the files again from admin screen.

What to Check

Once you uploaded all the files and got processed, verify that the search index got created with the updated values of index search field names that you have set in environment variables.

Please find below screenshot for your reference:

image image

Copy link

github-actions bot commented Aug 1, 2024

Coverage

Coverage Report •
FileStmtsMissCoverMissing
code
   create_app.py157199%336
code/backend/batch/utilities/helpers
   azure_search_helper.py570100% 
   env_helper.py146695%249–251, 270–272
code/backend/batch/utilities/helpers/embedders
   push_embedder.py730100% 
TOTAL265158677% 

Tests Skipped Failures Errors Time
298 0 💤 0 ❌ 0 🔥 38.130s ⏱️

Copy link
Collaborator

@adamdougal adamdougal left a comment

Choose a reason for hiding this comment

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

LGTM!

@adamdougal adamdougal added this pull request to the merge queue Aug 2, 2024
Merged via the queue into main with commit 19ecff1 Aug 2, 2024
11 checks passed
@adamdougal adamdougal deleted the PSL-BUG-4659 branch August 2, 2024 09:32
Copy link

github-actions bot commented Aug 2, 2024

🎉 This PR is included in version 1.9.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

tylorbunting pushed a commit to Cognitive-Automation-Labs/chat-with-your-data-solution-accelerator that referenced this pull request Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants