Browse Source

rt

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

Loading…
Cancel
Save