public class TrigramIndex extends ScalarIndexExtension<java.lang.Integer> implements CustomInputsIndexFileBasedIndexExtension<java.lang.Integer>, DocumentChangeDependentIndex
Modifier and Type | Field and Description |
---|---|
static boolean |
ENABLED
Deprecated.
not used anymore, always enabled
|
static ID<java.lang.Integer,java.lang.Void> |
INDEX_ID |
VOID_DATA_EXTERNALIZER
EXTENSION_POINT_NAME
Constructor and Description |
---|
TrigramIndex() |
Modifier and Type | Method and Description |
---|---|
DataExternalizer<java.util.Collection<java.lang.Integer>> |
createExternalizer() |
boolean |
dependsOnFileContent() |
DataIndexer<java.lang.Integer,java.lang.Void,FileContent> |
getIndexer() |
FileBasedIndex.InputFilter |
getInputFilter() |
KeyDescriptor<java.lang.Integer> |
getKeyDescriptor() |
ID<java.lang.Integer,java.lang.Void> |
getName() |
int |
getVersion() |
boolean |
hasSnapshotMapping() |
static boolean |
isIndexable(FileType fileType) |
boolean |
needsForwardIndexWhenSharing()
Whether this index needs the forward mapping to be shared along with inverted index.
|
getValueExternalizer
getCacheSize, getFileTypesWithSizeLimitNotApplicable, indexDirectories, keyIsUniqueForIndexedFile, traceKeyHashToVirtualFileMapping
@Deprecated public static final boolean ENABLED
public static final ID<java.lang.Integer,java.lang.Void> INDEX_ID
public static boolean isIndexable(FileType fileType)
public ID<java.lang.Integer,java.lang.Void> getName()
getName
in class FileBasedIndexExtension<java.lang.Integer,java.lang.Void>
public DataIndexer<java.lang.Integer,java.lang.Void,FileContent> getIndexer()
getIndexer
in class IndexExtension<java.lang.Integer,java.lang.Void,FileContent>
public KeyDescriptor<java.lang.Integer> getKeyDescriptor()
getKeyDescriptor
in class IndexExtension<java.lang.Integer,java.lang.Void,FileContent>
public FileBasedIndex.InputFilter getInputFilter()
getInputFilter
in class FileBasedIndexExtension<java.lang.Integer,java.lang.Void>
IndexExtension.getIndexer()
.
Usually DefaultFileTypeSpecificInputFilter
can be used here to index only files with given file-type.
Note that check only file's extension is usually error-prone way and prefer to check VirtualFile.getFileType()
:
for example user can enforce language file as plain text one.public boolean dependsOnFileContent()
dependsOnFileContent
in class FileBasedIndexExtension<java.lang.Integer,java.lang.Void>
public int getVersion()
getVersion
in class IndexExtension<java.lang.Integer,java.lang.Void,FileContent>
public boolean hasSnapshotMapping()
hasSnapshotMapping
in class FileBasedIndexExtension<java.lang.Integer,java.lang.Void>
public boolean needsForwardIndexWhenSharing()
FileBasedIndexExtension
false
, it is an error to call FileBasedIndex.getFileData(ID, VirtualFile, Project)
for this index
.needsForwardIndexWhenSharing
in class FileBasedIndexExtension<java.lang.Integer,java.lang.Void>
public DataExternalizer<java.util.Collection<java.lang.Integer>> createExternalizer()
createExternalizer
in interface CustomInputsIndexFileBasedIndexExtension<java.lang.Integer>