Crawling and Searching SMB Share With Ambar

This paper continues Ambar Installation: Step-by-step guide and guides you through setting up a Windows share and making Ambar crawl it.

Creating Windows Share

First of all, you need to create a new user to let Ambar authenticate into your shared folder. Open Run with Windows+R hotkeys, type compmgmt.msc and tap OK. Then go to Local Users and Groups tab, right-click on Users tab and press New User.

Fill in the form, specify a user name (I prefer 'ambar' just for consistency) and a password. Also uncheck User must check password at next login and check Password never expires and User cannot change password.

Now user is created. Let's share some folder to let Ambar crawl and index it. I'd like Ambar to index my Dropbox folder, so open it in explorer, right-click on it and click on Properties. Then click Advanced Sharing... button. Check Share this folder and tap Permissions button, remove Everyone and add ambar with Read permission.

Then tap OK. Go to Security tab, click Edit, then tap Add, and grant ambar user a read access to the folder.

The folder is shared.

Setting up Ambar SMB Crawler

Let's setup Ambar to crawl a shared folder. Go to the Settings page and create a new crawler by clicking the pink + button in the bottom-right corner. You'll see the JSON file with a new crawler's settings, it looks frightening, but actually it's very simple and comprehensive. Next fields are required:

  • id - id of the new crawler, Dropbox in my case
  • description - description of the new crawler
  • type - smb
  • locations - the locations for the crawler to crawl, specify your computer's host name, ip address and the created share name. You can get your computer's host name by executing hostname in the command line, and the ip address by ipconfig
  • credentials - specify the created login and password, auth_type is "ntlm".
  • schedule - specify the cron-style schedule, set active to true to enable the schedule
  • verbose - set logging level for the crawler. It's highly recommended to set it to false for locations with lots of files

Use the image below to help yourself setting it up.

create-crawler

Tap CREATE button. The created crawler will appear in the list. Hit ENQUEUE to start crawling and watch the process.

You can watch the crawling and processing state on the Statistics page. As Ambar crawls and processes files, they become searchable.

That's it!

Congrats! You've just setted up shared folders crawling with Ambar. Instructions on how to setup other types of crawlers you can find here.

Stay tuned and subscribe for our blog!

Igor S

Read more posts by this author.

Subscribe to Ambar Blog. How we made your docs searchable

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!