资源简介
Luke 是查询LUCENE索引文件的工具, 而且用 Luke 的Search可以做查询,此版本是5.5的版本
代码片段和文件信息
package org.apache.lucene.index;
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.store.*;
import org.apache.lucene.util.IOUtils;
import java.io.File;
import java.io.IOException;
import java.util.*;
/**
* This class allows us to peek at various Lucene internals not available
* through public APIs (for good reasons but inquiring minds want to know ...).
*
* @author ab
*
*/
public class IndexGate {
static HashMap knownExtensions = new HashMap();
// old version constants
public static final int OLD_FORMAT = -1;
/** This format adds details used for lockless commits. It differs
* slightly from the previous format in that file names
* are never re-used (write once). Instead each file is
* written to the next generation. For example
* segments_1 segments_2 etc. This allows us to not use
* a commit lock. See * href=“http://lucene.apache.org/java/docs/fileformats.html“>file
* formats for details.
*/
public static final int FORMAT_LOCKLESS = -2;
/** This format adds a “hasSingleNormFile“ flag into each segment info.
* See LUCENE-756
* for details.
*/
public static final int FORMAT_SINGLE_NORM_FILE = -3;
/** This format allows multiple segments to share a single
* vectors and stored fields file. */
public static final int FORMAT_SHARED_DOC_STORE = -4;
/** This format adds a checksum at the end of the file to
* ensure all bytes were successfully written. */
public static final int FORMAT_CHECKSUM = -5;
/** This format adds the deletion count for each segment.
* This way IndexWriter can efficiently report numDocs(). */
public static final int FORMAT_DEL_COUNT = -6;
/** This format adds the boolean hasProx to record if any
* fields in the segment store prox information (ie have
* omitTermFreqAndPositions==false) */
public static final int FORMAT_HAS_PROX = -7;
/** This format adds optional commit userData (String) storage. */
public static final int FORMAT_USER_DATA = -8;
/** This format adds optional per-segment String
* diagnostics storage and switches userData to Map */
public static final int FORMAT_DIAGNOSTICS = -9;
/** Each segment records whether it has term vectors */
public static final int FORMAT_HAS_VECTORS = -10;
/** Each segment records the Lucene version that created it. */
public static final int FORMAT_3_1 = -11;
/** Some early 4.0 pre-alpha */
public static final int FORMAT_PRE_4 = -12;
static {
knownExtensions.put(IndexFileNames.SEGMENTS “per-commit list of segments and user data“);
}
public static String getFileFunction(String file) {
if (file == null || file.trim().length() == 0) return file;
String res = null;
file = file.trim();
int idx = file.indexOf(‘.‘);
String suffix = null;
if (idx != -1) {
suff
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\
文件 17 2016-03-17 07:44 luke-pivot-luke-5.5.0\.gitignore
文件 18975 2016-03-17 07:44 luke-pivot-luke-5.5.0\CHANGES.txt
文件 3214 2016-03-17 07:44 luke-pivot-luke-5.5.0\README.md
文件 4184 2016-03-17 07:44 luke-pivot-luke-5.5.0\build.xm
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\docs\
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\docs\img\
文件 6185 2016-03-17 07:44 luke-pivot-luke-5.5.0\docs\img\LukeExportIndex.png
文件 5102 2016-03-17 07:44 luke-pivot-luke-5.5.0\docs\img\LukeTermVector.png
文件 58 2016-03-17 07:44 luke-pivot-luke-5.5.0\luke.bat
文件 1512 2016-03-17 07:44 luke-pivot-luke-5.5.0\luke.gif
文件 774 2016-03-17 07:44 luke-pivot-luke-5.5.0\luke.sh
文件 905 2016-03-17 07:44 luke-pivot-luke-5.5.0\luke_solr.sh
文件 11797 2016-03-17 07:44 luke-pivot-luke-5.5.0\pom.xm
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\assembly\
文件 657 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\assembly\assembly.xm
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\apache\
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\apache\lucene\
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\apache\lucene\index\
文件 13071 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\apache\lucene\index\IndexGate.java
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\apache\lucene\luke\
目录 0 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\apache\lucene\luke\core\
文件 473 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\apache\lucene\luke\core\AccessibleHitCollector.java
文件 1286 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\apache\lucene\luke\core\AccessibleTopHitCollector.java
文件 2041 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\apache\lucene\luke\core\AllHitsCollector.java
文件 23283 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\apache\lucene\luke\core\BrowserLauncher.java
文件 18369 2016-03-17 07:44 luke-pivot-luke-5.5.0\src\main\java\org\apache\lucene\luke\core\ClassFinder.java
............此处省略193个文件信息
- 上一篇:步进马达试验步进马达
- 下一篇:GVIM中高亮log文件的语法配置
评论
共有 条评论