Indexing PDF with Solr

前端 未结 6 2042
一向
一向 2020-12-31 05:46

Can anyone point me to a tutorial.

My main experience with Solr is indexing CSV files. But I cannot find any simple instructions/tutorial to tell me what I need to d

6条回答
  •  醉酒成梦
    2020-12-31 05:49

    public class SolrCellRequestDemo {
    public static void main (String[] args) throws IOException, SolrServerException {
    SolrClient client = new
    HttpSolrClient.Builder("http://localhost:8983/solr/my_collection").build();
    ContentStreamUpdateRequest req = new
    ContentStreamUpdateRequest("/update/extract");
    req.addFile(new File("my-file.pdf"));
    req.setParam(ExtractingParams.EXTRACT_ONLY, "true");
    NamedList result = client.request(req);
    System.out.println("Result: " +enter code here result);
    }
    
    
    

    This may help.

    提交回复
    热议问题