Browse Source

REPORT-9446

【10.0一轮回归】alphafine搜不出本地常用了
master
XiaXiang 7 years ago
parent
commit
445b39af9e
  1. 5
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

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

@ -14,6 +14,7 @@ import com.fr.json.JSONException;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.third.org.apache.lucene.analysis.Analyzer;
import com.fr.third.org.apache.lucene.analysis.standard.StandardAnalyzer;
import com.fr.third.org.apache.lucene.document.Document;
@ -115,7 +116,9 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
private void initReader() {
if (indexReader == null) {
try {
directory = FSDirectory.open(new File(path));
File file = new File(path);
StableUtils.mkdirs(file);
directory = FSDirectory.open(file);
indexReader = DirectoryReader.open(directory);
} catch (IOException e) {
FineLoggerFactory.getLogger().error("not privilege to read " + path);

Loading…
Cancel
Save