2011-11-07 3 views
1

solr 서버에서 색인을 생성해야하는 파일이 있습니다. 파일을 업로드하려면 어떻게해야합니까? curl로 처리하는 방법을 알고 있습니다. curl "http : // localhost : 8983/solr/update/extract? literal.id = doc1 & uprefix = attr_ & fmap.content = attr_content & commit = true"-F "myfile [email protected] "rsolr을 사용하여 파일을 업로드하는 방법은 무엇입니까?

(http://wiki.apache.org/solr/ExtractingRequestHandler)하지만 rsolr rubygem으로 번역하는 방법을 모르겠습니다.

미리 감사드립니다.

solr = RSolr.connect :url => 'http://your.solrserver.com:8983/solr' 
solr.post 'update/extract', :params => { 
     :'literal.id' => 'your-id', 
     :'fmap.content' => 'attr_content', 
     :'stream.file' => '/path/to/your/file/, 
     :uprefix => 'attr_f', 
     :commit => 'true' 
    } 
:

답변

1

은 파일을 업로드 할 수있는 방법입니다
관련 문제