The provider itself can say whether or not it applies to a particular file, but org.eclipse.wst.jsdt.internal.core.search.indexing.IndexManager#indexAll(IProject) looks like it might be what you're looking for--beware that it's internal, although unlikely to be changed. The reset() method you were looking at may only remove the in-memory representations without invalidating the indexed already on disk, and the build() method will only invoke the builders. JSDT (like JDT) is foremost a source model; the builder only serves to perform validation.
As an aside, you should only mark the files as needing rebuilding with IResource#touch() rather than forcing a rebuild immediately. Users who have automatic builds disabled shouldn't have to endure a build until they ask for it.
IBM Emerging Technologies