Introduction
This will be a tutorial on how to improve our search for our windows
file servers, using the Windows Search Service. What we will be working
with is Windows Server 2012 R2, however, this will also work for both
2016, 2019, etc.
Getting Into the Server
The first thing we are going to do is go to our server dashboard and add
a role. To do this we are going to select the button that says, “Add
roles and features”. Click “Next”, leave it on the option that says
“Role-based or feature-based installation”, and click “Next” again.
Then, choose your server and select “Next”. While in Server Roles, we
are going to select “Next” at the bottom once again as what we are
searching for is a feature. Under “Features”, we are going to search for
a feature called “Windows Search Service”. Once found, click on the
checkbox next to it and select “Next”. We will then click “Install” to
get this installed.
Filter Pack
Our next item we are going to add is the filter pack. The filter pack
will allow us the ability to search inside of documents. To download
this, we are going to open a web browser, and navigate to this link:
- https://www.microsoft.com/en-us/download/details.aspx?id=17062
Once there, you will notice it says, “Microsoft Office 2010 Filter
Packs”. That is okay as this will provide us with what we need. Make
sure to get the 64-bit version when installing. We will then run the
download. Click “Next”, accept the checkbox and click “Next”, and click
“Ok” and it should be installed.
Turning on the Windows Search Services
Our next step is to turn on the Windows Search Service. To get to that,
go to your Server Manager Dashboard and you should see “Tools” at the
top right. Click on that and select “Services”. We will then need to
find “Windows Search” which may be very far down as it is alphabetical.
If it is not already started, click on it and start it up as well as
make sure “Automatic (Delayed Start)” is selected for startup type.
Control Panel
To Launch the control panel, you can right click on the Windows Icon at
the bottom left of your screen and select “Control Panel”. Whilst in
there, you will search at the top for “Index” and select “Indexing
Options”. Now we are going to add the share drive location. We will
click on “Modify” and navigate to the drive we want and select “Ok”.
Index Location
While in the Indexing options from the previous part, we will select
“Advanced”. We can then change the location that we are storing the
indexing files. This is very important as this file could grow large
depending on how often this is used. Some good options are to create a
separate drive to put this in, or make sure your C: Drive has plenty of
space on it. You can also change the file types that are being indexed
by going to the tab “File Types” if you would like. We can then click
“Ok”.
Indexing Speed
While back in the Indexing Options, you may see that “Indexing speed is
reduced due to user activity”. This is caused by a user being logged in
as it slows down to not use up the PC nearly as much. It is best
practice to leave this running overnight. When it finishes, the file
search will now be much faster and more efficient. All devices connected
will also have much quicker search speeds as well.
Full Video
SUPPORT MY WORK
Hire US
TECH I USE AND RECOMMEND
Tech Kits
Domain Registrar
Digital Ocean CloudServer
- Kevin Stevenson
- Thursday, Oct 14, 2021
Файл Windows.edb (Windows.db в Windows 11) хранит индексную базу данных службы поиска Windows (Windows Search). Поисковый индекс позволяет пользователям выполнять быстрый поиск файлов, электронных писем в pst файлах и другого контента на диске. Индексирование файлов выполняется в фоновом режиме процессом
SearchIndexer.exe
. При большом количестве файлов на диске размер файла Windows.edb может вырастать до десятков и даже сотен Гб, занимая все свободное место на системном диске.
Содержание:
- Сбросить поисковый индекса службы Windows Search
- Уменьшаем размер файла Windows.edb с помощью дефрагментации
- Ручное удаление и пересоздание файла Windows.edb
- Перенос файла Windows.edb на другой диск
- Почему сильно растет размер файла Windows.edb
Файл Windows.edb является скрытым и по-умолчанию хранится в каталоге C:\ProgramData\Microsoft\Search\Data\Applications\Windows\.
В Windows 11 вместо файла Windows.edb для хранения индекса службы поиска используется файл Windows.db.
Чтобы быстро узнать текущий размер файла Windows.edb можно воспользоваться PoweShell командой:
((Get-Item $env:programdata'\Microsoft\Search\Data\Applications\Windows\Windows.edb').length/1GB)
В моем примере при поиске больших файлов на диске, я обнаружил что размер файла Windows.edb вырос до 15,5 Гб (а это почти 15% на моем 100 Гб SSD диске).
Далее рассмотрим, как уменьшить размер индексного файла Windows.edb службы поиска Windows.
Сбросить поисковый индекса службы Windows Search
Для уменьшения размера файла Windows.edb можно использовать встроенную функцию Windows Search, которая выполняет полную переиндексации содержимого диска.
- Откройте панель Settings -> Search -> Searching Windows -> Advanced Search Indexer Settings (в классической Control Panel перейдите в Indexing Options, или выполните команду
сontrol srchadmin.dll
); - Нажмите кнопку Advanced -> Rebuild;
- Windows Search удалит старый файл Windows.edb, выполнит сканирование диск, переоздаст и перестроит индексный файл. Этот процесс может занять длительное время в зависимости от количества файлов на диске.
Уменьшаем размер файла Windows.edb с помощью дефрагментации
Индексный файл службы поиска Windows представляет собой базу в формате EDB. Можно выполнить офлайн дефрагментацию EDB базы с помощью встроенной утилиты esentutl.exe (Extensible Storage Engine Utility), хорошо знакомой администраторам Exchange. Воспользуйтесь готовым BAT скриптом для остановки службы Windows Search и офлайн дефрагментации файла Windows.edb:
sc config wsearch start=disabled
sc stop wsearch
esentutl.exe /d %ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.edb
sc config wsearch start=delayed-auto
sc start wsearch
Совет. Для выполнения дефрагментации EDB базы на диске должно быть достаточно свободного места, т.к. будет создана копия edb файла.
Дефрагментации позволяет уменьшить размер базы поиска на 20-50 процентов
Этот способ можно применить для дефрагментации файла службы поиска на всех версиях Windows, кроме Windows 11. В Windows 11 вместо файла Windows.edb с типом базы данных JET, используется новый формат файла Windows.db. Это база данных на базе SQLite, которую нельзя индексировать с помощью esentutl.exe.
Ручное удаление и пересоздание файла Windows.edb
Если места на диске критически мало, можно вручную удалить файл Windows.edb. Это действие безопасно, т.к. вы не теряете никакие данные, сбрасывается только поисковый индекс. Для удаления файла Windows.edb остановите службу Windows Search, затем удалите файл и запустите службу.
net stop "Windows Search"
REG ADD "HKLM\SOFTWARE\Microsoft\Windows Search" /v SetupCompletedSuccessfully /t REG_DWORD /d 0 /f
del %PROGRAMDATA%\Microsoft\Search\Data\Applications\Windows\Windows.edb
net start "Windows Search"
Параметр реестра
SetupCompletedSuccessfully = 0
указывает службе Windows Search, что нужно восстановить настройки по-умолчанию.
После перезапуска, служба Windows Search начнет процесс переиндексации данных на дисках компьютера и пересоздаст файл Windows.edb (в процессе полной переиндексации производительность системы может снизится).
Перенос файла Windows.edb на другой диск
В некоторых сценариях пользователи могут активно использовать поиск на диске через Windows Search (например, пользователи терминального RDS сервера часто используют поиск в папках и личных PST файлах). В таком случае, если вы не можете кардинально уменьшить размер файла Windows.edb или постоянно сбрасывать поисковые индексы, вы можете перенести его с системного раздела на другой диск.
Для смены местоположения файла перейдите в Control Panel –> Indexing Options -> Advanced -> Index location-> New Location и укажите путь к новому местоположению файла Windows.edb и нажмите OK.
Перезапустите службу поиска:
Restart-Service wsearch
Почему сильно растет размер файла Windows.edb
Если после дефрагментации и/или перестройки поискового индекса, его размер опять начинает сильно расти, попробуйте следующие методики, которые могут помочь решить проблему.
- Запустите встроенное средство исправления неполадок поиска Windows (Search and Indexing Troubleshooter). Выполните команду:
msdt.exe -ep SystemSettings_Troubleshoot_L2 -id SearchDiagnostic
. В списке проблем выберите, что поиск или индексация выполняется медленно (Search or indexing is slow). Далее мастер устранения неполадок попробуем вернуть службу Windows Search в нормальное состояние; - Старайтесь индексировать только необходимые контент. Исключайте из поискового индекса элементы, поиск в которых вы не используете. Нажмите кнопку Modify в настройках индексирования и в окне Indexing Location отключите пути и приложения, которые не нужно индексировать. После изменения настроек путей индексирования перестройте индекс Advanced -> Rebuild;
- Если вы используете на компьютере Outlook с PST файлами, то при их индексировании размер файла Windows.edb растет пропорционально размеру PST файлов. Это может привести к исчерпанию места на диске и проблемам с производительностью. В этом случае Microsoft рекомендует исключить Outlook из списка индексируемых элементов.
Естественно при этом в Outlook перестанет работать поиск (это не будет проблема, если вы храните своя ящик на сервере Exchange с включенным поисковым индексом);
- Если ничего не помогает, и размер файла постоянно растет, вы можете полностью отключить службу wsearch, или настроить логон скрипт, который сбрасывает поисковый индекс при каждой загрузке компьютера.
Need a more powerful search software for your Windows Server? Learn more here…
Windows Search Server vs. Search Service
The Windows Search Protocol allows communication with a server that hosts a Windows Search Service. The Windows Search Service can issue queries and it also allows an administrator to manage an indexing server. The indexing process runs within the LocalSystem account and constantly runs for all users. This allows Windows Search to:
- Maintain an index that can be shared among all of the users.
- Maintain security restrictions and access to content.
- Process remote queries from computers on the network.
Don’t confuse the Windows Search Service with Microsoft Search Server Express. Microsoft Search Server Express is a free enterprise-class search server, which enables high performance searches of corporate data across multiple systems. Search Server Express has a similar appearance to a Windows SharePoint Services site. The main difference between Windows Search and Search Server Express is that Windows Search can search on a desktop and a server, where Search Server Express can only search on the server.
Windows Search Service on Windows Server 2008
If you are already using a Windows Server based computer, and are currently using Windows Server 2008 then you should know that the Windows Search Service might not be installed by default. You can install and configure the Windows Search Service manually, but it takes some time, patience, and a bit of knowledge to get it done. Here are the steps that you will need to follow:
- Click Start > All Programs > Administrative Tools and then Server Manager
- You will see a console tree in Server Manager, right click on Roles and then choose Add Roles.
- When the Add Roles Wizard opens, click Next.
- Add the Windows Search Service.
- You will need to choose the Volumes with shared folders to be indexed.
- Now you can finish & close the wizard. This should have the search service up and running.
Enable Windows Search Service on Windows Server 2012
While the steps are similar to enabling the search service on previous server versions, there are enough differences to write up the steps you need to follow to enable the Windows search service on Windows Server 2012. Here’s what you need to do:
Open the Server Manager tool, then click Manage.
Go to Add Roles and Features to open the Add Roles and Features Wizard window.
Click Next to open the wizard to the Installation type page.
Select Role based or feature based installation option, and click Next.
Now you are on the server selection page. Select the server you want the service installed on. If you only have one server, it will automatically select it. Click Next.
Now you are in the Server Roles page. Just click Next, because you are installing a feature, not a role.
This will open the Features page, here is where you can choose Windows Search Service (make sure the check box is checked) click Next.
You are now in the confirmation page. To confirm the selection, just click Install. Please note that it will take some time to install the Windows Search Service.
The installation should now be complete.
Adding a New Location to be Indexed
A common problem that users on a network face is that when they try to add a network drive to their Library, an error message suddenly pops up that says “this network location can’t be included because it is not indexed”. There’s no need to worry though, this problem is easy to solve. The following steps require Windows Server 2008 or higher, and will work directly with Windows 7, 8, and 10 Libraries.
When the Windows Search Server is enabled, the server generates an index which is then stored on a Network Share. The clients that have this share mounted can use the search index to find the files they need.
The first step is to create a Shared Folder to host the search index. This can easily be done by going to the Server Manager > File and Storage Services > Shares and setting the appropriate User and File permissions.
Next you should enable Windows Search Service from your server. See the steps outlined above to do so on Windows Server 2008 and 2012.
With Windows Search Service installed and the shared folder created, you will then need to add that shared folder to the index. On the server, go to Control Panel > Indexing Options then click Modify to add the folder or even an entire drive to the index.
Now you will be able to add the network share to the library without the error message appearing.
Файл Windows.edb |
|||||
|
|||||
|
|||||
|
|||||
|
|||||
|
|||||
|
|||||
|
|||||
|
|||||
|
|||||
|
В связи с введением в действие Постановления Правительства Российской Федерации от 14.11.2023 № 1905 т.н. «о запрете популяризации VPN» с 1 марта 2024 года — любое обсуждение способов обхода блокировок и VPN на портале запрещено!
Applies ToWindows 8 Windows 8 Pro Windows 8 Enterprise Windows Server 2012 Datacenter Windows Server 2012 Datacenter Windows Server 2012 Essentials Windows Server 2012 Foundation Windows Server 2012 Foundation Windows Server 2012 Standard Windows Server 2012 Standard
Симптомы
В Windows 8 и Windows Server 2012 служба поиска Windows может раздувать размер файла Windows.edb. В этом случае файл Windows.edb будет увеличиваться вплоть до очень большого размера и займёт много места на диске. В некоторых случаях размер файла может быть больше 50 гигабайт (ГБ).
Решение
Сведения об обновлении
Для решения этой проблемы установите набор обновлений 2836988 для Windows 8 и Windows Server 2012. Дополнительные сведения о том, как получить этот накопительный пакет обновления, щелкните следующий номер статьи базы знаний Майкрософт:
2836988 Windows Server 2012 и Windows 8 накопительный пакет обновления: Май 2013Примечание. Это обновление является профилактическим, но не исправлением. Чтобы уменьшить размер файла Windows.edb, который уже подвержен этой проблеме, после установки данного обновления необходимо перестроить индекс поиска.
-
Проведите пальцем от правого края экрана, а затем коснитесь кнопки Поиск. Или, если вы используете мышь, переведите указатель в правый нижний угол экрана и нажмите кнопку Поиск.
-
Коснитесь или щелкните Параметры.
-
В поле поиска введите Параметры индексирования.
-
Коснитесь или щелкните Параметры индексирования.
-
Коснитесь или нажмите кнопку Дополнительно.
-
Коснитесь или нажмите кнопку Перестроить на вкладке « Параметры индексирования ».
-
Коснитесь или щелкните OK для подтверждения.
-
Измените службу поиска Windows, чтобы он не запускается автоматически. Чтобы сделать это, выполните следующую команду в cmd.exe:
Sc config wsearch start=disabled
-
Выполните следующую команду, чтобы остановить службу поиска Windows:
Net stop wsearch
-
Выполните следующую команду для выполнения автономного сжатия файла Windows.edb:
esentutl.exe /d %AllUsersProfile%\Microsoft\Search\Data\Applications\Windows\Windows.edb
-
Выполните следующую команду, чтобы изменить службу поиска Windows для отложенного запуска:
Sc config wsearch start=delayed-auto
-
Выполните следующую команду, чтобы запустить службу:
Net start wsearch
Статус
Корпорация Майкрософт подтверждает, что это проблема продуктов Майкрософт, перечисленных в разделе «Относится к».
Дополнительные сведения
Для получения дополнительных сведений о терминологии обновлений программного обеспечения щелкните следующий номер статьи базы знаний Майкрософт:
Описание 824684 Стандартные термины, используемые при описании обновлений программных продуктов Майкрософт
Нужна дополнительная помощь?
Нужны дополнительные параметры?
Изучите преимущества подписки, просмотрите учебные курсы, узнайте, как защитить свое устройство и т. д.