質問

I am very new to Apache Solr search engine . I have installed on my CENT OS VM and need to index the documents .Through the Apache Solr UI , I am able to put and index the document but Can I do the same through any JAVA API ? Kindly help me ... Thanks

役に立ちましたか?

解決

Try SolrJ. For Solr, here are some links to get started.

  1. Apache Solr Reference Guide
  2. Solr Wiki
  3. Yonik's Getting Started With Solr

他のヒント

Use SolrJ

HttpSolrServer solr = new HttpSolrServer("<host>:<port>");
SolrQuery solrquery = new SolrQuery();
solrquery.setQuery("test");
solrquery.set("defType", "edismax");
solrquery.setHighlight(true);
QueryResponse queryResponse = solr.query(solrquery);
SolrDocumentList documentList = queryResponse.getResults();

Hope this helps :)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top