
SolrInputDocument::addField 메서드를 사용하여 필드를 추가할 수 있는 타입은 다음과 같습니다.
- string
- int
- float
- boolean
- date
- array
- object
addField 메서드를 사용하여 필드를 추가할 때, 필드의 이름과 타입을 지정하는 방법은 다음과 같습니다.
#hostingforum.kr
php
$solrDoc = new SolrInputDocument();
$solrDoc->addField('name', 'John Doe', 'string');
$solrDoc->addField('age', 30, 'int');
$solrDoc->addField('isMarried', true, 'boolean');
위 예제에서, 'name' 필드는 string 타입이고, 'age' 필드는 int 타입, 'isMarried' 필드는 boolean 타입입니다.
2025-06-04 13:53