mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
updated the use of fullHitInfo flag and list names used in KeywordSearchResultFactory, which in turn corrects how results show up in the GUI browser
This commit is contained in:
parent
f100a31656
commit
4c0f26b324
@ -172,13 +172,18 @@ class KeywordSearchResultFactory extends ChildFactory<KeyValueQueryContent> {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//get listname
|
// Get listname
|
||||||
String listName = "";
|
String listName = "";
|
||||||
KeywordList list = KeywordSearchListsXML.getCurrent().getListWithKeyword(keywordSearchQuery.getQueryString());
|
// fullHitInfo determines whether a hit is posted in a list as a raw query string or formatted with Keyword.toString()
|
||||||
if (list != null) {
|
boolean fullHitInfo = true;
|
||||||
listName = list.getName();
|
if (queryRequests.size() > 1) {
|
||||||
|
KeywordList list = KeywordSearchListsXML.getCurrent().getListWithKeyword(keywordSearchQuery.getQueryString());
|
||||||
|
if (list != null) {
|
||||||
|
listName = list.getName();
|
||||||
|
}
|
||||||
|
fullHitInfo = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean literal_query = keywordSearchQuery.isLiteral();
|
final boolean literal_query = keywordSearchQuery.isLiteral();
|
||||||
|
|
||||||
int resID = 0;
|
int resID = 0;
|
||||||
@ -234,7 +239,7 @@ class KeywordSearchResultFactory extends ChildFactory<KeyValueQueryContent> {
|
|||||||
//cannot reuse snippet in BlackboardResultWriter
|
//cannot reuse snippet in BlackboardResultWriter
|
||||||
//because for regex searches in UI we compress results by showing a file per regex once (even if multiple term hits)
|
//because for regex searches in UI we compress results by showing a file per regex once (even if multiple term hits)
|
||||||
//whereas in bb we write every hit per file separately
|
//whereas in bb we write every hit per file separately
|
||||||
new BlackboardResultWriter(queryResults, keywordSearchQuery, listName).execute();
|
new BlackboardResultWriter(queryResults, keywordSearchQuery, listName, fullHitInfo).execute();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -381,12 +386,14 @@ class KeywordSearchResultFactory extends ChildFactory<KeyValueQueryContent> {
|
|||||||
private String listName;
|
private String listName;
|
||||||
private QueryResults hits;
|
private QueryResults hits;
|
||||||
private Collection<BlackboardArtifact> newArtifacts = new ArrayList<>();
|
private Collection<BlackboardArtifact> newArtifacts = new ArrayList<>();
|
||||||
|
private boolean fullHitInfo;
|
||||||
private static final int QUERY_DISPLAY_LEN = 40;
|
private static final int QUERY_DISPLAY_LEN = 40;
|
||||||
|
|
||||||
BlackboardResultWriter(QueryResults hits, KeywordSearchQuery query, String listName) {
|
BlackboardResultWriter(QueryResults hits, KeywordSearchQuery query, String listName, boolean fullHitInfo) {
|
||||||
this.hits = hits;
|
this.hits = hits;
|
||||||
this.query = query;
|
this.query = query;
|
||||||
this.listName = listName;
|
this.listName = listName;
|
||||||
|
this.fullHitInfo = fullHitInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void finalizeWorker() {
|
protected void finalizeWorker() {
|
||||||
@ -418,8 +425,8 @@ class KeywordSearchResultFactory extends ChildFactory<KeyValueQueryContent> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Create blackboard artifacts
|
// Create blackboard artifacts
|
||||||
// notifyInbox == false, fullHitInfo == true
|
boolean notifyInbox = false;
|
||||||
newArtifacts = hits.writeAllHitsToBlackBoard(query, listName, progress, null, this, false, true);
|
newArtifacts = hits.writeAllHitsToBlackBoard(query, listName, progress, null, this, notifyInbox, fullHitInfo);
|
||||||
} finally {
|
} finally {
|
||||||
finalizeWorker();
|
finalizeWorker();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user