我是SOLR的新手,我正在使用SOLRQuery查詢數據庫並返回下載的數據。返回的行數以百萬計。SOLR分頁
流程類似於 在GUI中,單擊下載按鈕>通過REST,Java代碼使用SOLRQuery來獲取數據並將其返回到GUI,其中數據作爲文件下載。
由於行數太多,我很少擔心獲取數據和下載文件所需的時間。那麼,是否需要在SOLR查詢級別分頁?我的意思是我應該使用SOLR Query的Deep分頁來提高性能? 我添加下面的代碼:
HttpSolrServer searcherServer = new HttpSolrServer(url);
SolrQuery solrQuery = new SolrQuery();
solrQuery.setRequestHandler("/export");
solrQuery.setQuery(query);
solrQuery.set("fl","field1");
solrQuery.setSort(SolrQuery.SortClause.asc("field1"));
QueryResponse resp = searcherServer.query(solrQuery);
schema.xml中我加docValues =「true」將Field 1和solrconfig.xml中我加入這裏給出https://home.apache.org/~ctargett/RefGuidePOC/jekyll-full/exporting-result-sets.html
你是否親自嘗試過? – Mysterion
你在設計出口嗎?分頁是由不同的人逐頁完成的。我不知道用戶通過數百萬頁手動頁面。 – cheffe
是的,我正在設計出口kinda – MadxG