AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

reIndex (데이터베이스 명령)

reIndex

버전 6.0부터 더 이상 사용되지 않습니다.

Attempting to run the reIndex command writes a warning message to the log.

In mongosh, this command can also be run through the db.collection.reIndex() helper method.

Helper methods are convenient for mongosh users, but they may not return the same level of information as database commands. In cases where the convenience is not needed or the additional return fields are required, use the database command.

The reIndex command drops all indexes on a collection and recreates them. This operation may be expensive for collections that have a large amount of data and/or a large number of indexes.

경고

이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.

중요

이 명령은 MongoDB Atlas 클러스터에서 지원되지 않습니다. 모든 명령에 대한 Atlas 지원에 관해 자세히 알아보려면 지원되지 않는 명령을 참조하세요.

명령은 다음과 같은 구문을 가집니다:

db.runCommand(
{
reIndex: <collection>
}
)

이 명령은 다음 필드를 사용합니다.

필드
설명

reIndex

다시 인덱스할 collection의 이름입니다.

MongoDB 이상의 5.0 경우 는 독립형 reIndex 인스턴스에서만 실행 수 있습니다.

reIndex 컬렉션에 대한 배타적(W) 잠금을 획득하고 완료될 때까지 컬렉션에 대한 다른 작업을 차단합니다.

MongoDB 잠금에 대한 자세한 내용은 FAQ: 동시성을 참조하세요.

MongoDB의 인덱싱 작업 동작에 대한 자세한 내용 은 채워진 collection에 대한 인덱스 빌드 를 참조하세요.

이 페이지 평가하기