1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-13 17:56:20 +00:00

Finding several documents by their title in a single query (#696)

This commit is contained in:
Julien Kirch
2023-06-06 21:31:01 +02:00
committed by GitHub
parent a9cdbdc03e
commit 22a44d0c8d
5 changed files with 63 additions and 28 deletions

View File

@@ -84,9 +84,9 @@ public class DocumentCriteria {
private String mimeType;
/**
* The title.
* Titles to include.
*/
private String title;
private List<String> titleList = new ArrayList<>();
public List<String> getTargetIdList() {
return targetIdList;
@@ -192,11 +192,7 @@ public class DocumentCriteria {
this.mimeType = mimeType;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
public List<String> getTitleList() {
return titleList;
}
}

View File

@@ -295,9 +295,9 @@ public class LuceneIndexingHandler implements IndexingHandler {
criteriaList.add("d.DOC_UPDATEDATE_D <= :updateDateMax");
parameterMap.put("updateDateMax", criteria.getUpdateDateMax());
}
if (criteria.getTitle() != null) {
criteriaList.add("d.DOC_TITLE_C = :title");
parameterMap.put("title", criteria.getTitle());
if (!criteria.getTitleList().isEmpty()) {
criteriaList.add("d.DOC_TITLE_C in :title");
parameterMap.put("title", criteria.getTitleList());
}
if (!criteria.getTagIdList().isEmpty()) {
int index = 0;