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.
|
// "content" string to be indexed.
|
||||||
StringBuilder artifactContents = new StringBuilder();
|
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 {
|
try {
|
||||||
for (BlackboardAttribute attribute : artifact.getAttributes()) {
|
for (BlackboardAttribute attribute : artifact.getAttributes()) {
|
||||||
artifactContents.append(attribute.getAttributeType().getDisplayName());
|
artifactContents.append(attribute.getAttributeType().getDisplayName());
|
||||||
@ -67,7 +57,7 @@ class ArtifactTextExtractor implements TextExtractor {
|
|||||||
// in the Autopsy datamodel.
|
// in the Autopsy datamodel.
|
||||||
switch (attribute.getValueType()) {
|
switch (attribute.getValueType()) {
|
||||||
case DATETIME:
|
case DATETIME:
|
||||||
artifactContents.append(ContentUtils.getStringTime(attribute.getValueLong(), dataSource));
|
artifactContents.append(ContentUtils.getStringTime(attribute.getValueLong(), artifact));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
artifactContents.append(attribute.getDisplayString());
|
artifactContents.append(attribute.getDisplayString());
|
||||||
|
@ -457,7 +457,8 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService {
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
void handleNewArtifacts(Blackboard.ArtifactsPostedEvent event) {
|
void handleNewArtifacts(Blackboard.ArtifactsPostedEvent event) {
|
||||||
for (BlackboardArtifact artifact : event.getArtifacts()) {
|
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 {
|
try {
|
||||||
index(artifact);
|
index(artifact);
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user