Skip to content

Commit

Permalink
fix #2564 add analyzer for description field
Browse files Browse the repository at this point in the history
  • Loading branch information
marevol committed May 6, 2021
1 parent bfcde3f commit e624a92
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected void setupListCondition(final DataConfigCB cb, final DataConfigPager d
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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected void setupListCondition(final FileConfigCB cb, final FileConfigPager f
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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected void setupListCondition(final WebConfigCB cb, final WebConfigPager web
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.

Expand Down
15 changes: 15 additions & 0 deletions src/main/resources/fess_indices/.fess_config.data_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"type": "long"
},
"description" : {
"type": "text"
"type": "text",
"analyzer": "standard_analyzer"
}
}
}
15 changes: 15 additions & 0 deletions src/main/resources/fess_indices/.fess_config.file_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
"type": "long"
},
"description" : {
"type": "text"
"type": "text",
"analyzer": "standard_analyzer"
}
}
}
15 changes: 15 additions & 0 deletions src/main/resources/fess_indices/.fess_config.web_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"type": "long"
},
"description" : {
"type": "text"
"type": "text",
"analyzer": "standard_analyzer"
}
}
}

0 comments on commit e624a92

Please sign in to comment.