fix #2564 add analyzer for description field

This commit is contained in:
Shinsuke Sugaya 2021-05-06 10:30:15 +09:00
parent bfcde3f28e
commit e624a92004
9 changed files with 54 additions and 6 deletions

View file

@ -94,7 +94,7 @@ public class DataConfigService extends FessAppService {
cb.query().setHandlerName_Wildcard(wrapQuery(dataConfigPager.handlerName));
}
if (StringUtil.isNotBlank(dataConfigPager.description)) {
cb.query().setDescription_Wildcard(wrapQuery(dataConfigPager.description));
cb.query().setDescription_MatchPhrase(wrapQuery(dataConfigPager.description));
}
// TODO Long, Integer, String supported only.

View file

@ -103,7 +103,7 @@ public class FileConfigService extends FessAppService {
cb.query().setPaths_Wildcard(wrapQuery(fileConfigPager.paths));
}
if (StringUtil.isNotBlank(fileConfigPager.description)) {
cb.query().setDescription_Wildcard(wrapQuery(fileConfigPager.description));
cb.query().setDescription_MatchPhrase(wrapQuery(fileConfigPager.description));
}
// TODO Long, Integer, String supported only.

View file

@ -111,7 +111,7 @@ public class WebConfigService extends FessAppService {
cb.query().setUrls_Wildcard(wrapQuery(webConfigPager.urls));
}
if (StringUtil.isNotBlank(webConfigPager.description)) {
cb.query().setDescription_Wildcard(wrapQuery(webConfigPager.description));
cb.query().setDescription_MatchPhrase(wrapQuery(webConfigPager.description));
}
// TODO Long, Integer, String supported only.

View file

@ -5,6 +5,21 @@
"number_of_shards": 1,
"number_of_replicas": 0,
"auto_expand_replicas": "0-1"
},
"analysis": {
"analyzer": {
"standard_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"cjk_width",
"asciifolding",
"lowercase",
"stop",
"stemmer"
]
}
}
}
}
}

View file

@ -40,7 +40,8 @@
"type": "long"
},
"description" : {
"type": "text"
"type": "text",
"analyzer": "standard_analyzer"
}
}
}

View file

@ -5,6 +5,21 @@
"number_of_shards": 1,
"number_of_replicas": 0,
"auto_expand_replicas": "0-1"
},
"analysis": {
"analyzer": {
"standard_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"cjk_width",
"asciifolding",
"lowercase",
"stop",
"stemmer"
]
}
}
}
}
}

View file

@ -64,7 +64,8 @@
"type": "long"
},
"description" : {
"type": "text"
"type": "text",
"analyzer": "standard_analyzer"
}
}
}

View file

@ -5,6 +5,21 @@
"number_of_shards": 1,
"number_of_replicas": 0,
"auto_expand_replicas": "0-1"
},
"analysis": {
"analyzer": {
"standard_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"cjk_width",
"asciifolding",
"lowercase",
"stop",
"stemmer"
]
}
}
}
}
}

View file

@ -67,7 +67,8 @@
"type": "long"
},
"description" : {
"type": "text"
"type": "text",
"analyzer": "standard_analyzer"
}
}
}