Disable intellij indexing on specific folder
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.