diff --git a/iped-app/src/main/java/iped/app/ui/ParentTableModel.java b/iped-app/src/main/java/iped/app/ui/ParentTableModel.java index adfd1a1c7a..92310f26fc 100644 --- a/iped-app/src/main/java/iped/app/ui/ParentTableModel.java +++ b/iped-app/src/main/java/iped/app/ui/ParentTableModel.java @@ -30,7 +30,10 @@ import org.apache.lucene.search.Query; import org.apache.lucene.search.TermQuery; +import iped.data.IItem; +import iped.engine.task.index.IndexItem; import iped.properties.BasicProps; +import iped.properties.ExtraProperties; public class ParentTableModel extends BaseTableModel { diff --git a/iped-app/src/main/java/iped/app/ui/ReferencingTableModel.java b/iped-app/src/main/java/iped/app/ui/ReferencingTableModel.java index e9800524db..1eb295b0ca 100644 --- a/iped-app/src/main/java/iped/app/ui/ReferencingTableModel.java +++ b/iped-app/src/main/java/iped/app/ui/ReferencingTableModel.java @@ -26,9 +26,12 @@ import org.apache.commons.lang3.StringUtils; import org.apache.lucene.document.Document; +import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.search.BooleanQuery; +import org.apache.lucene.search.Query; import org.apache.lucene.search.TermInSetQuery; +import org.apache.lucene.search.TermQuery; import org.apache.lucene.util.BytesRef; import iped.engine.search.QueryBuilder; @@ -40,6 +43,7 @@ import iped.parsers.shareaza.ShareazaLibraryDatParser; import iped.properties.BasicProps; import iped.properties.ExtraProperties; +import scala.annotation.meta.field; public class ReferencingTableModel extends BaseTableModel { @@ -61,7 +65,6 @@ public void valueChanged(ListSelectionModel lsm) { public Query createQuery(Document doc) { BooleanQuery.Builder queryBuilder = new BooleanQuery.Builder(); - BooleanQuery.Builder queryBuilder = new BooleanQuery.Builder(); // linkedItems queries String[] linkedItems = doc.getValues(ExtraProperties.LINKED_ITEMS); if (linkedItems.length > 0) { @@ -109,15 +112,6 @@ public Query createQuery(Document doc) { queryBuilder.add(new TermQuery(new Term(ExtraProperties.UFED_ID, ufedFileId)), Occur.SHOULD); } - BooleanQuery query = queryBuilder.build(); - - if (!query.clauses().isEmpty()) { - - Set hashes = Arrays.asList(sharedHashes).stream().filter(StringUtils::isNotBlank) - .map(h -> new BytesRef(h)).collect(Collectors.toSet()); - queryBuilder.add(new TermInSetQuery(field, hashes), Occur.SHOULD); - } - return queryBuilder.build(); }