Browse Source
Merge pull request #4970 from abpframework/maliming/es-version
Convert special characters in Version.
pull/4976/head
liangshiwei
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
2 deletions
-
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Documents/FullSearch/Elastic/ElasticDocumentFullSearch.cs
|
|
|
@ -73,7 +73,7 @@ namespace Volo.Docs.Documents.FullSearch.Elastic |
|
|
|
FileName = document.FileName, |
|
|
|
Content = document.Content, |
|
|
|
LanguageCode = ConvertLanguageCode(document.LanguageCode), |
|
|
|
Version = document.Version |
|
|
|
Version = ConvertVersion(document.Version) |
|
|
|
}; |
|
|
|
|
|
|
|
if (!existsResponse.Exists) |
|
|
|
@ -173,7 +173,7 @@ namespace Volo.Docs.Documents.FullSearch.Elastic |
|
|
|
new TermQuery |
|
|
|
{ |
|
|
|
Field = "version", |
|
|
|
Value = version |
|
|
|
Value = ConvertVersion(version) |
|
|
|
}, |
|
|
|
new TermQuery |
|
|
|
{ |
|
|
|
@ -237,5 +237,10 @@ namespace Volo.Docs.Documents.FullSearch.Elastic |
|
|
|
{ |
|
|
|
return languageCode.Replace("-", "").ToLower(); |
|
|
|
} |
|
|
|
|
|
|
|
protected string ConvertVersion(string version) |
|
|
|
{ |
|
|
|
return version.Replace("-", "").ToLower(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|