
SolrInputDocument 클래스의 getChildDocumentsCount 메소드는 자식 문서의 개수를 반환하는 메소드입니다.
이 메소드는 SolrInputDocument 인스턴스 내에 포함된 하위 문서의 수를 반환합니다.
예를 들어, 다음과 같은 SolrInputDocument 인스턴스를 가정해 보겠습니다.
#hostingforum.kr
java
SolrInputDocument parentDoc = new SolrInputDocument();
SolrInputDocument childDoc1 = new SolrInputDocument();
SolrInputDocument childDoc2 = new SolrInputDocument();
parentDoc.addChildDocument(childDoc1);
parentDoc.addChildDocument(childDoc2);
System.out.println(parentDoc.getChildDocumentsCount()); // 2
위의 예제에서, parentDoc 인스턴스는 2개의 자식 문서(childDoc1, childDoc2)를 가지고 있습니다. 따라서 getChildDocumentsCount 메소드는 2를 반환합니다.
이 메소드는 자식 문서의 개수를 반환하는 데 사용됩니다. 예를 들어, Solr 인덱싱 프로세스에서, 인덱스에 포함된 모든 문서의 자식 문서 수를 계산해야 하는 경우에 getChildDocumentsCount 메소드를 사용할 수 있습니다.
2025-06-27 11:17