Browse Source

rt

research/10.0
XiaXiang 6 years ago
parent
commit
c0569eb29b
  1. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

@ -44,7 +44,7 @@ import java.util.List;
* Created by XiaXiang on 2018/1/22.
*/
public class RecentSearchManager implements AlphaFineSearchProvider {
private static final int MAX_SIZE = 3;
private static final int MAX_SIZE = 100;
private static RecentSearchManager instance;
IndexReader indexReader = null;
IndexSearcher indexSearcher = null;
@ -174,7 +174,7 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
String searchField = "searchKey";
Term term = new Term(searchField, key);
Query query = new TermQuery(term);
TopFieldDocs docs = searcher.search(query, 100, sortKey);
TopFieldDocs docs = searcher.search(query, MAX_SIZE, sortKey);
ScoreDoc[] scores = docs.scoreDocs;
this.recentModelList = new SearchResult();
//遍历结果

Loading…
Cancel
Save