Commit 746587a1 authored by 张龙发's avatar 张龙发

数据库文件升级

parent 0df8cb20
...@@ -769,4 +769,153 @@ ...@@ -769,4 +769,153 @@
alter table AS_TREECLASSFIC add(SERIALINDEX VARCHAR2(500)); alter table AS_TREECLASSFIC add(SERIALINDEX VARCHAR2(500));
</sql> </sql>
</version> </version>
<version edition="44" description="ES搜索模板升级">
<sql creator="zhanglongfa" createDate="20200707" note="ES搜索模板升级">
delete from AS_SEARCH_TEMPLATE where key='catalog_home_result' or key = 'catalog_file_home_result';
insert into "AS_SEARCH_TEMPLATE" ("ID","KEY","TEMPLATE","DESCRIPTION","PARAS","INDICES") values (818, 'catalog_home_result', '{
"_source" : {
"excludes" : ["files.*"]
},
"query" : {
"bool" : {
"must" : {{#toJson}}searchStatement{{/toJson}},
"filter": [
{"term" : { "business_id" : "{{businessId}}" }},
{"terms" : {{#toJson}}libId{{/toJson}}},
{
"bool":{
"should":[
{"prefix":{"idseq":"{{idSeq}}"}},
{"term" : {"idseq.keyword": "{{idSeq}}"}}
]
}
}
]
}
},
"from" : "{{from}}",
"size" : "{{size}}",
"highlight" : {
"fields" : {
"*" : {}
}
}
}', '仅搜索指定目录,高亮所有字段,搜素档案类型与档案分类', '{
"from":"0",
"size":"10",
"businessId":"1",
"libId":"1",
"idSeq":"109.",
"searchStatement":[{
"multi_match" : {
"query": "档案",
"fields": "*_retrieval",
"type": "most_fields",
"lenient": true
}
},{
"multi_match" : {
"query": "济宁",
"fields": "*_retrieval",
"type": "most_fields",
"lenient": true
}
}]
}
', 'archser');
insert into "AS_SEARCH_TEMPLATE" ("ID","KEY","TEMPLATE","DESCRIPTION","PARAS","INDICES") values (822, 'catalog_file_home_result', '{
"_source" : {
"excludes" : ["files.*"]
},
"query": {
"bool" : {
"must" : {
"bool" : {
"should" : [
{
"bool":{
"must": {{#toJson}}searchStatement{{/toJson}}
}
},
{
"bool":{
"must": {{#toJson}}searchFileStatement{{/toJson}}
}
}
]
}
},
"filter": [
{"term" : {"business_id": "{{businessId}}"}},
{"terms" : {{#toJson}}libId{{/toJson}}},
{
"bool":{
"should":[
{"prefix":{"idseq":"{{idSeq}}"}},
{"term" : {"idseq.keyword": "{{idSeq}}"}}
]
}
}
]
}
},
"from" : "{{from}}",
"size" : "{{size}}",
"highlight" : {
"fields" : {
"*" : {}
}
}
}', '搜索档案类型与档案分类,所有目录和文件,高亮所有字段', '{
"from":"0",
"size":"500",
"businessId":"2",
"libId":"1745",
"idSeq":"109.",
"searchStatement":[{
"multi_match" : {
"query": "档案",
"fields": "*_retrieval",
"type": "most_fields",
"lenient": true
}
},{
"multi_match" : {
"query": "济宁",
"fields": "*_retrieval",
"type": "most_fields",
"lenient": true
}
}],
"searchFileStatement":[
{
"nested" : {
"path" : "files",
"query" : {
"multi_match" : {
"query": "档案",
"type": "best_fields"
}
}
}
},
{
"nested" : {
"path" : "files",
"query" : {
"multi_match" : {
"query": "城乡",
"type": "best_fields"
}
}
}
}
]
}
', 'archser');
</sql>
</version>
</update> </update>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment