DISCLAIMER: This app is not for production use and is strictly for customers to demo the value that Semantic Search can bring.
This sample app is for customers that want to test out Semantic Search capabilities with their customers index. This app has side-by-side comaparitive functionality that allows you to see Azure Cognitive Search BM25 vs Semantic Search results.
You can find a live demo here.
- A GitHub account
- Node.js and Git
- Visual Studio Code installed
- An Azure Cognitive Search Service in a region and tier that supports Semantic Search. You'll also need:
- Index Name
- Semantic Configuration Name
- API Key
This project can be run anywhere, but VS Code is required for local debugging.
- Open the application with VS Code.
- Install dependencies
npm install
- Create a .env file with the following info:
REACT_APP_SEARCH_DOMAIN="{your-search-service-domain}"
REACT_APP_SEARCH_API_KEY={your-api-key}
REACT_APP_SEARCH_SEMANTIC_CONFIG={your-semantic-config}
REACT_APP_SEARCH_INDEX_NAME={your-index-name}
REACT_APP_SEARCH_CUSTOMER_NAME={your-index-name}
- Configure your dataset store
- Go to Stores > DatasetStore.ts
- Fill out the below datasetDefinition object based off your index definition to display the documents in the UI appropriatley. Note: attributionField and description are OPTIONAL.
- fieldNames: [fieldName1, fieldName2, fieldName3, etc]
- keyField: [keyFieldName]
- titleField: [titleFieldName]
- attributionField: [urlFieldName]
- description: "free input text box describing your dataset"
- Run the React Application
npm start
If you'd like to contribute, please submit a PR and a member of the Semantic Search Team will approve/reject the PR.