#2584 improve search on description
This commit is contained in:
parent
0c860aca32
commit
44698db750
3 changed files with 21 additions and 3 deletions
|
@ -94,7 +94,13 @@ public class DataConfigService extends FessAppService {
|
|||
cb.query().setHandlerName_Wildcard(wrapQuery(dataConfigPager.handlerName));
|
||||
}
|
||||
if (StringUtil.isNotBlank(dataConfigPager.description)) {
|
||||
cb.query().setDescription_Wildcard(wrapQuery(dataConfigPager.description));
|
||||
if (dataConfigPager.description.startsWith("*")) {
|
||||
cb.query().setDescription_Wildcard(dataConfigPager.description);
|
||||
} else if (dataConfigPager.description.endsWith("*")) {
|
||||
cb.query().setDescription_Prefix(dataConfigPager.description.replaceAll("\\*$", StringUtil.EMPTY));
|
||||
} else {
|
||||
cb.query().setDescription_MatchPhrase(dataConfigPager.description);
|
||||
}
|
||||
}
|
||||
// TODO Long, Integer, String supported only.
|
||||
|
||||
|
|
|
@ -103,7 +103,13 @@ public class FileConfigService extends FessAppService {
|
|||
cb.query().setPaths_Wildcard(wrapQuery(fileConfigPager.paths));
|
||||
}
|
||||
if (StringUtil.isNotBlank(fileConfigPager.description)) {
|
||||
cb.query().setDescription_Wildcard(wrapQuery(fileConfigPager.description));
|
||||
if (fileConfigPager.description.startsWith("*")) {
|
||||
cb.query().setDescription_Wildcard(fileConfigPager.description);
|
||||
} else if (fileConfigPager.description.endsWith("*")) {
|
||||
cb.query().setDescription_Prefix(fileConfigPager.description.replaceAll("\\*$", StringUtil.EMPTY));
|
||||
} else {
|
||||
cb.query().setDescription_MatchPhrase(fileConfigPager.description);
|
||||
}
|
||||
}
|
||||
// TODO Long, Integer, String supported only.
|
||||
|
||||
|
|
|
@ -111,7 +111,13 @@ public class WebConfigService extends FessAppService {
|
|||
cb.query().setUrls_Wildcard(wrapQuery(webConfigPager.urls));
|
||||
}
|
||||
if (StringUtil.isNotBlank(webConfigPager.description)) {
|
||||
cb.query().setDescription_Wildcard(wrapQuery(webConfigPager.description));
|
||||
if (webConfigPager.description.startsWith("*")) {
|
||||
cb.query().setDescription_Wildcard(webConfigPager.description);
|
||||
} else if (webConfigPager.description.endsWith("*")) {
|
||||
cb.query().setDescription_Prefix(webConfigPager.description.replaceAll("\\*$", StringUtil.EMPTY));
|
||||
} else {
|
||||
cb.query().setDescription_MatchPhrase(webConfigPager.description);
|
||||
}
|
||||
}
|
||||
// TODO Long, Integer, String supported only.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue