solr在java中使用的基本代码

简介private static String coreName = "comonly"; private HttpSolrClient httpSolrClient; httpSolrClient = new HttpSolrClient.Builder("http://localhost:8983/solr") .withConnectionTimeout(10000) .withSocketTimeout(60000) .build(); //创建查询对象 So
private static String coreName = "comonly";
private HttpSolrClient httpSolrClient;
httpSolrClient = new HttpSolrClient.Builder("http://localhost:8983/solr")
    .withConnectionTimeout(10000)
    .withSocketTimeout(60000)
    .build();

//创建查询对象
SolrQuery solrQuery = new SolrQuery();

//获取响应对象
QueryResponse queryResponse = httpSolrClient.query(coreName,solrQuery);
新加评论 评论标题: