You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何停止AEM中运行的/oak:index/cqTagLucene等OOTB索引并重新索引

How to Stop a Running OOTB Index in AEM

If you've got an out-of-the-box index like /oak:index/cqTagLucene chugging along for 4 days (thanks to those millions of PDF assets), here are the reliable ways to halt it cleanly before updating your exclude paths:

Method 1: Use the JMX Console (Most Straightforward)

This is the go-to method for stopping in-progress index builds:

  • Navigate to your AEM instance's JMX console at http://<your-aem-host>:<port>/system/console/jmx
  • Search for the org.apache.jackrabbit.oak:name=IndexStats,type=QueryEngine MBean
  • Find the operation named stopIndexing(String indexPath)
  • Enter the full path of your index (e.g., /oak:index/cqTagLucene) in the parameter field and click Invoke
  • Verify the index status by checking the getIndexStatus(String indexPath) operation—it should return IDLE once stopped

Method 2: Directly Modify the Index Node via CRXDE Lite

If JMX isn't accessible or you prefer working with repository nodes:

  • Open CRXDE Lite at http://<your-aem-host>:<port>/crx/de
  • Navigate to the index node: /oak:index/cqTagLucene
  • Locate the reindex property (it's set to true since the index is running)
  • Change reindex to false and save the node
  • Optional but recommended: Check the /oak:index/cqTagLucene:async child node—if it exists, delete it to clear any pending indexing tasks

Method 3: Run a Groovy Script (For Automation/Bulk Operations)

If you're comfortable with scripting, this works well for repeat tasks:

  • Open the Groovy Console at http://<your-aem-host>:<port>/groovyconsole
  • Paste the following script, replacing the index path with yours:
import org.apache.jackrabbit.oak.api.QueryEngine
import org.apache.jackrabbit.oak.spi.query.QueryIndex

def indexPath = "/oak:index/cqTagLucene"
def queryEngine = osgi.getService(QueryEngine.class)

queryEngine.stopIndexing(indexPath)
println "Index ${indexPath} has been stopped. Current status: ${queryEngine.getIndexStatus(indexPath)}"
  • Click Run Script to execute it

Post-Stop Tips Before Re-Running the Index

  • Double-check that the index status is IDLE using JMX or CRXDE (look for the indexStatus property on the index node)
  • Add your excludePaths property to the index node (e.g., exclude large PDF asset folders that don't need tagging indexing)
  • When you're ready to re-trigger, set reindex back to true—this will start the index build with your new exclude paths, which should be much faster

内容的提问来源于stack exchange,提问作者Mukesh Jha

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 08:07:21