Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable intellij indexing on specific folder

People also ask

How do I stop indexing in IntelliJ?

Just Go to: File -> Setting -> Directories. Stop all the files that are going to included and need to empty ADD Content Root. Show activity on this post. It resolved my problem.

How do I ignore a folder in IntelliJ?

You can also just right click on your folder and select Mark Directory As > Excluded . Excluded folders (shown as rootExcluded) are ones that IntelliJ IDEA "partially ignores".

Why is IntelliJ indexing all the time?

If indexing takes a significant amount of time, then it's likely that your project has more than two modules. Normally, you don't need all of them at same time. If this is the case, you can temporarily set aside (unload) the modules that you don't need right now.


Mark this folder as Excluded in the File | Project Structure | Modules | Sources tab.

Edit: also make sure it's not added as a library in the project.


On IntelliJ 13+ (don't know for earlier versions), you can right click on a folder > Mark Directory As > Excluded.


if you cannot do it throu the Modules menu because your intellij freezes (like in my case) edit .iml file of your projet and add excludeFolder line as below:

<content url="file://$MODULE_DIR$">
  <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
  <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
  <sourceFolder url="file://$MODULE_DIR$/src/test/features" type="java-test-resource" />
  <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
  <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
  <excludeFolder url="file://$MODULE_DIR$/node_modules" />
  <excludeFolder url="file://$MODULE_DIR$/target" />
</content>

The option is now called Stop/Start Index, available from the folder context menu in solution explorer. When index is stopped, the folder will appear with "no index" annotation on the right.

enter image description here

I excluded the build output folder and no longer getting lengthy index refreshes after each build. Also full text search is a lot faster (near instant).

enter image description here