/semantic-multilingual-demo

Azure Cognitive Search - Semantic search demo of querying a multilingual index.

Primary LanguageTypeScript

Azure Cognitive Search - Semantic search Multilingual Demo

DISCLAIMER: This app is not for production use and is strictly for customers to demo how to search over multilingual search indexes using Semantic search.

This is a repository built with NextJS that provides a user-friendly interface for querying a multilingual index with semantic search. The goal of this project is to make it easier for users to find the information they need, no matter what language they speak or what type of search they perform.

You can find a live demo here Screenshot

Features

  • User-friendly interface for querying a multilingual index
  • Language selection
  • Semantic search, making it easier for users to find relevant information
  • Built with NextJS and Tailwind CSS for fast and efficient performance

Getting Started

Prerequisites

Once you've met all the pre-requisites, you'll need to follow these steps:

  1. Clone this repository to your local machine using git clone https://github.com/farzad528/semantic-multilingual-demo.git

  2. Change into the newly created directory using cd [your directory here]

  3. Install the required dependencies by running npm install or yarn install

  4. Configure variables 4.1 Create a .env file in the folder root with the following info:

     SERVICE_NAME=your-search-service-name
     API_KEY=your-api-key
     INDEX_NAME=your-index-name
     API_VERSION=2021-04-30-preview
    

    4.2 Go to pages\api\search.tsx and fill in the following values that correspond to your search index and query requirements:

    • queryLanguage (e.g. "es-es")
    • semanticCongifuration (e.g. "config_es")
    • [OPTIONAL] select fields (e.g. "id, title_es, content_es"). This is optional as Semantic will search fields only given in your Semantic configuration. However selecting only the fields to retrieve back in your response will improve the performance of your application.
  5. Start the development server by running npm run dev or yarn dev.

  6. Open your browser to http://localhost:3000 to view the user interface for querying the multilingual index with semantic search.

Note: You must use the 2021-04-30-preview API-version or greater to use the Semantic search features in Azure Cognitive Search.

Conclusion

I hope you find this repository useful for querying your multilingual index with semantic search. If you have any questions or suggestions, please feel free to open an issue and I'll be happy to help.

Contributing

If you'd like to contribute to this repository, please feel free to do so! There are many ways to contribute, such as fixing bugs, improving the documentation, or adding new features. To get started, simply fork this repository and make your changes. When you're ready, submit a pull request and I'll take a look.

Conclusion

I hope you find this repository useful for querying your multilingual index with semantic search. If you have any questions or suggestions, please feel free to open an issue and I'll be happy to help.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

For additional links, please visit the list of available query languages: List of supported languages for Semantic search