Code Monkey home page Code Monkey logo

vscode-azurecognitivesearch's Introduction

Azure Cognitive Search for Visual Studio Code (Preview)

Note: This extension is no longer being maintained and has been removed from the Visual Studio Code Marketplace. You can still install the extension directly from the VSIX file if you'd like to use it. To install the extension from the VSIX file, follow the instructions below or see this link for more information.

  1. Download the VSIX file and open Visual Studio Code
  2. Press Ctrl+Shift+P or Cmd+Shift+P to open the command palette
  3. Type Install from VSIX and press Enter
  4. Select the VSIX file you downloaded

Azure Cognitive Search is a search-as-a-service cloud solution that gives developers APIs and tools for adding a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications.

This Visual Studio Code extension makes it easy to manage your search service with the full capabilities of the REST APIs while providing rich IntelliSense and snippets to make it easier to take advantage of the full range of capabilities. With the extension, you can create and update indexes and other components, add documents, search, and more. Check out the gifs and images below to see the extension in action.

Features

Browse all your Azure Cognitive Search services

Get access to all your search services in one place. You can quickly see all your indexes, indexers, and other components.

Overview of the extension

Create new indexes, indexers, data sources, skillsets and synonym maps

You can create a new index or other component just by editing the JSON and saving the file. You can then read, update, or delete these components at any time.

Create index demo

Take advantage of rich IntelliSense

The extension also includes IntelliSense to guide you as you’re building out your JSON. Instead of referencing external docs each time, you can see what parameters exist and what their allowed values are as you type.

Rich intellisense

In addition to IntelliSense, the extension provides snippets or templates for building more complex objects, such as data sources and skillsets, so that you have a good starting point.

Edit or delete indexes, indexers, data sources, skillsets and synonym maps

Delete index

Add or update documents in the search index

Adding or updating documents is something that’s not possible in the portal today. With the extension, you can quickly add a document, and it will even save you some time by creating a JSON template for you based on your index definition.

Add of update documents

You can view or update existing documents too.

Query your search indexes

Once you’ve added documents to your search service, you can also query from within the extension and view the results side by side. You can even add multiple queries or save the queries to a file to refer to them later.

Search an index

Get started

  1. Install the extension from the VSIX file.

    1. Download the VSIX file and open Visual Studio Code
    2. Press Ctrl+Shift+P or Cmd+Shift+P to open the command palette
    3. Type Install from VSIX and press Enter
    4. Select the VSIX file you downloaded
  2. On View > Command palette, scroll or type Azure: Sign in.

  3. After signing in, select the Azure button on the bottom left. You should get the list of installed Azure extensions on the right in extension explorer.

  4. Expand Cognitive Search, your subscription, and your search service to access content. You need Contribute permissions or above to access the content.

To filter the subscriptions that show up in the extension's explorer, select Select Subscriptions... button on any subscription node (indicated by a filter icon when you hover over it), or select View > Command palette and search for Azure: Select Subscriptions. Note that the filter will apply to all VS Code extensions that support the Azure Account and Sign-In extension.

If you don't have an Azure Account, you can sign up for one today for free and receive $200 in credits by selecting Create a Free Azure Account..." or selecting View > Command palette and searching for Azure: Create an Account.

To sign out, search for Azure: Sign out in View > Command palette.

Contributing

There are several ways you can contribute to our repo:

  • Ideas, feature requests and bugs: We are open to all ideas and we want to get rid of bugs! Use the Issues section to report a new issue, provide your ideas or contribute to existing threads.
  • Documentation: Found a typo or strangely worded sentences? Submit a PR!
  • Code: Contribute bug fixes, features or design changes:
    • Clone the repository locally and open in VS Code.
    • Open the terminal (press CTRL+`) and run npm install.
    • To build, press F1 and type in Tasks: Run Build Task.
    • Debug: press F5 to start debugging the extension.

Legal

Before we can accept your pull request, you will need to sign a Contribution License Agreement. All you need to do is to submit a pull request, then the PR will get appropriately labelled (e.g. cla-required, cla-norequired, cla-signed, cla-already-signed). If you already signed the agreement, we will proceed with the PR, otherwise the system will tell you how you can sign the CLA. Once you sign the CLA, all future PR's will be labeled as cla-signed.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Telemetry

VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you don't wish to send usage data to Microsoft, you can set the telemetry.enableTelemetry setting to false. Learn more in our FAQ.

License

MIT

vscode-azurecognitivesearch's People

Contributors

chris-digitise avatar chuwik avatar dependabot[bot] avatar dereklegenzoff avatar heidisteen avatar microsoft-github-policy-service[bot] avatar pablocastro avatar phil-b avatar piotrgradzinski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vscode-azurecognitivesearch's Issues

Error while creating new Index on Azure Cognitive Search

Does this occur consistently?
Repro steps:

Action: azureCognitiveSearch.searchDocument.onDidSaveTextDocument
Error type: Error
Error Message: The request is invalid.

Version: 0.2.0
OS: win32
OS Release: 10.0.18363
Product: Visual Studio Code
Product Version: 1.56.2
Language: en

Call Stack
SimpleSearchClient.<anonymous> extension.bundle.js:5:209545
rejected extension.bundle.js:5:206203
processTicksAndRejections task_queues.js:93:5

Support Workspace Trust

Hello 👋 I'm from the VS Code team.

Recently, we have been exploring a security feature we refer to as Workspace Trust. This feature is intended to centralize and unify a security conscious decision required by a variety of VS Code features. With workspace trust, the user will be able to declare whether or not they trust the folder that is opened in VS Code before these features are executed.

Why you should care

Your extension is incredibly popular with VS Code users! We want to make sure that those users have a delightful experience with workspace trust and that includes extension authors deciding how much of their extension is supported in an untrusted workspace.

Workspace Trust experience

You can enable the feature with the following setting security.workspace.trust.enabled. Once enabled, you will see the following dialog when opening folders in VS Code.

Workspace Trust Startup Dialog

This dialog is important for allowing the user to make a decision early and understand the impact of their decision. Once you understand the feature, you may want to customize when to display the dialog using the setting security.workspace.trust.startupPrompt.

You can follow the development of Workspace Trust and provide feedback in issue #106488.

Workspace trust API

First off, all of what I am about to say can be found in issue #120251. That issue will include discussion of the feature and any updates to the feature.

The Workspace Trust extension API is now in stable. This allowed us to release the first cut of our guide for onboarding your extension to Workspace Trust. The API is small, so here is a quick look.

You can declare your extension to provide complete, partial or no support in untrusted workspaces using the untrustedWorkspaces capability in package.json.

The following example declares that the extension is supported completely in untrusted workspaces. In this case, the extension is enabled in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": true
  }
}

The next example declares that the extension is not supported in untrusted workspaces. In this case, the extension is disabled in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": false
  }
}

The third option is to declared limited support. There are three tools provided to you when you select the limited option.

First, if you have a setting that can be configured in the workspace but requires the workspace to be trusted in order to apply the workspace value, then you can include the setting using restrictedConfigurations array property in untrustedWorkspaces object. Doing so, VS Code will ignore the workspace value of these restricted settings when your extension reads these settings values using the VS Code Workspace Configuration API.

The following example declares the settings that are restricted in untrusted workspaces.

"capabilities": {
  "untrustedWorkspaces": {
    "supported": "limited",
    "restrictedConfigurations": [
      "markdown.styles"
    ]
  }
}

Next, you can also check and listen if the current workspace is trusted or not programmatically using the following API:

export namespace workspace {
  /**
   * When true, the user has explicitly trusted the contents of the workspace.
   */
  export const isTrusted: boolean;
  /**
   * Event that fires when the current workspace has been trusted.
   */
  export const onDidGrantWorkspaceTrust: Event<void>;
}

Lastly, you can hide commands or views declaratively with the isWorkspaceTrusted context key in your when clauses.

A far more detailed guide on how to onboard which will be updated as we receive feedback can be found in issue #120251.

Rollout plan

Workspace Trust will remain disabled for the month of May, but we are planning on enabling this by default in the future. To prepare for that day, we would love for you to try it out and provide feedback.

We'd love your feedback

Since this issue was created in an automated fashion, we won't be monitoring the responses in this issue (our notifications would explode!). Instead we ask you to drop questions, and feedback in issue #120251 as we've mentioned above.

We're excited to see what you do with workspace trust!

Cognitive Search not working

Does this occur consistently?
Repro steps:

Action: azureCognitiveSearch.search
Error type: Error
Error Message: Entry not found in cache.

Version: 0.3.1
OS: win32
OS Release: 10.0.22000
Product: Visual Studio Code
Product Version: 1.70.1
Language: en

Call Stack
Logger.createError extension.bundle.js:2:820371
TokenRequest.<anonymous> extension.bundle.js:2:845807
extension.bundle.js:2:840157extension.bundle.js:2:840157
extension.bundle.js:2:812478extension.bundle.js:2:812478
extension.bundle.js:2:811641extension.bundle.js:2:811641
extension.bundle.js:2:833247extension.bundle.js:2:833247

Improvement proposal

I would like to propose several improvements to the plugin, that I would find very useful and I am able to help with their development if the ideas will be accepted.

Whole proposal comes from the lack of possibility to use some basic functions related to search service in Azure Portal when search service has any firewall rules enabled. I am talking about the overview screen. Such restrictions are often required and not being able to do things like indexer reset or to see the indexation errors is very frustrating. Also there is no alternative really for that other than writing some custom tools that use search management API - which is not blocking any requests if they are coming from allowed IPs.

Stats

Service stats

New element after "Service Details" where we can show the usage of: storage, indexes, indexers, data sources, number of replicas, partitions, search units and the number of documents. Some simple table (with web view maybe) or later on with nice charts.

Indexes stats

Summary of documents count and used storage per index.

Indexers stats

Summary of indexes, status of last indexer execution, last indexer execution, docs succeeded, number of errors/warnings.

Indexer stats

For the particular indexer I would like to add the ability to be able to browse last indexer execution with details related to each execution like duration, docs succeeded, errors/warnings.

What do you think? Would I have a green light from you guys to start implementing those elements?

azure cogntive search extension error while creating datasource

Does this occur consistently?
Repro steps:

Action: azureCognitiveSearch.searchDocument.onDidSaveTextDocument
Error type: Error
Error Message: Error: connect ETIMEDOUT 10.124.40.14:443

Version: 0.2.0
OS: win32
OS Release: 10.0.14393
Product: Visual Studio Code
Product Version: 1.56.2
Language: en

Call Stack
SimpleSearchClient.<anonymous> extension.bundle.js:5:209545
rejected extension.bundle.js:5:206203
processTicksAndRejections task_queues.js:93:5

Support virtual workspaces

👋 Hi there, Martin here, from the VS Code team.

Recently we've announced the Remote Repository feature that lets you browse and edit files and folders directly on GitHub.

Open Remote Repository... opens VSCode on a folder or workspace located on a virtual file system. We call this a virtual workspace. We observed that not all extension support this well, either because they can not, or they haven't thought about it.

It would be fantastic if you could test whether your extension can handle virtual workspaces:

Check out the Virtual Workspaces Extension Author Guide on how to do that.

When done, set the new virtualWorkspaces capability in your 'package.json'.

{
  "capabilities": {
    "virtualWorkspaces": true | false
  }
}
  • Use "virtualWorkspaces": true if your extension is prepared for virtual workspaces
  • Use "virtualWorkspaces": false if your extension should be disabled when a virtual workspace is opened

For questions and comments please use the Virtual Workspaces Tracking Issue.

Thanks for the support and the great work! ❤️

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.