mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge pull request #5632 from sleuthkit/6036_optimize
6036: reduce cache processing time. Ignore associated objects and min…
This commit is contained in:
commit
c6d96f507f
@ -46,16 +46,6 @@ class ArtifactTextExtractor implements TextExtractor {
|
||||
// "content" string to be indexed.
|
||||
StringBuilder artifactContents = new StringBuilder();
|
||||
|
||||
Content dataSource = null;
|
||||
try {
|
||||
dataSource = artifact.getDataSource();
|
||||
} catch (TskCoreException tskCoreException) {
|
||||
throw new InitReaderException("Unable to get datasource for artifact: " + artifact.toString(), tskCoreException);
|
||||
}
|
||||
if (dataSource == null) {
|
||||
throw new InitReaderException("Datasource was null for artifact: " + artifact.toString());
|
||||
}
|
||||
|
||||
try {
|
||||
for (BlackboardAttribute attribute : artifact.getAttributes()) {
|
||||
artifactContents.append(attribute.getAttributeType().getDisplayName());
|
||||
@ -67,7 +57,7 @@ class ArtifactTextExtractor implements TextExtractor {
|
||||
// in the Autopsy datamodel.
|
||||
switch (attribute.getValueType()) {
|
||||
case DATETIME:
|
||||
artifactContents.append(ContentUtils.getStringTime(attribute.getValueLong(), dataSource));
|
||||
artifactContents.append(ContentUtils.getStringTime(attribute.getValueLong(), artifact));
|
||||
break;
|
||||
default:
|
||||
artifactContents.append(attribute.getDisplayString());
|
||||
|
@ -457,7 +457,8 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService {
|
||||
@Subscribe
|
||||
void handleNewArtifacts(Blackboard.ArtifactsPostedEvent event) {
|
||||
for (BlackboardArtifact artifact : event.getArtifacts()) {
|
||||
if (artifact.getArtifactTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) { //don't index KWH artifacts.
|
||||
if ((artifact.getArtifactTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) && // don't index KWH bc it's based on existing indexed text
|
||||
(artifact.getArtifactTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_ASSOCIATED_OBJECT.getTypeID())){ //don't index AO bc it has only an artifact ID - no useful text
|
||||
try {
|
||||
index(artifact);
|
||||
} catch (TskCoreException ex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user