hi
You can rename your
SearchModelclass toMySearchModelor inherit theVolo.Docs.Pages.Documents.SearchModel.[Dependency(ReplaceServices = true)] [ExposeServices(typeof(SearchModel), typeof(MySearchModel))] public class MySearchModel : SearchModel { private readonly IProjectAppService _projectAppService; private readonly IDocumentAppService _documentAppService; private readonly HtmlEncoder _encoder; public MySearchModel( IProjectAppService projectAppService, IDocumentAppService documentAppService, HtmlEncoder encoder) : base(projectAppService, documentAppService, encoder) { _projectAppService = projectAppService; _documentAppService = documentAppService; _encoder = encoder; } public override async Task<IActionResult> OnGetAsync(string keyword) { if (!await _documentAppService.FullSearchEnabledAsync()) { return RedirectToPage("Index"); } KeyWord = keyword; Project = await _projectAppService.GetAsync(ProjectName); var output = await _projectAppService.GetVersionsAsync(Project.ShortName); var versions = output.Items.ToList(); if (versions.Any() && string.Equals(Version, DocsAppConsts.Latest, StringComparison.OrdinalIgnoreCase)) { if ((!Project.ExtraProperties.ContainsKey("GithubVersionProviderSource") || (GithubVersionProviderSource) (long) Project.ExtraProperties["GithubVersionProviderSource"] ==GithubVersionProviderSource.Releases) && !string.IsNullOrEmpty(Project.LatestVersionBranchName)) { Version = Project.LatestVersionBranchName; } else { Version = (versions.FirstOrDefault(v => !SemanticVersionHelper.IsPreRelease(v.Name)) ?? versions.First()).Name; } } SearchOutputs = await _documentAppService.SearchAsync(new DocumentSearchInput { ProjectId = Project.Id, Context = KeyWord, LanguageCode = LanguageCode, Version = Version }); var highlightTag1 = Guid.NewGuid().ToString(); var highlightTag2 = Guid.NewGuid().ToString(); foreach (var searchOutput in SearchOutputs) { for (var i = 0; i < searchOutput.Highlight.Count; i++) { searchOutput.Highlight[i] = _encoder .Encode(searchOutput.Highlight[i].Replace("<highlight>", highlightTag1) .Replace("</highlight>", highlightTag2)) .Replace(highlightTag1, "<highlight>").Replace(highlightTag2, "</highlight>"); } } return Page(); } }
hi I have made the necessary adjustments to my project. However, I am unable to display the search bar in my project, and I am getting an error when trying to navigate to the search page using the link "https://localhost:44337/search".
I shared the project with the error by e-mail
hi
Add the below code.
Configure<DocsUiOptions>(options => { options.RoutePrefix = null; });
hi maliming
Do you have any program or method suggestions for easier creation of .md files?
The transition between document pages takes 5-6 seconds. What could be the reason for this? And what can I do to improve performance?
The transition between document pages takes 5-6 seconds. What could be the reason for this? And what can I do to improve performance?
Can you share the logs? It shouldn't take too long.
hi maliming
I sent log.txt via mail "I couldn't find any documentation related to the usage of the version dropdown on the document page. Can you assist me on this matter?"
hi
There are no performance problems here, and our docs website is also using this module.
https://docs.abp.io/en/abp/latest/ https://docs.abp.io/en/commercial/latest/
I couldn't find any documentation related to the usage of the version dropdown on the document page. Can you assist me on this matter?
You can add some releases.
https://github.com/burakyilmaz45/abp/releases
hi When I want to search with Elastic search, I need to search for the whole word. For example, when I want to find the word "String", I cannot find it when I type "Str", but I can find it when I type "String". Is there a solution for this?
This is the behavior of Elastic search, you can search for related documents, I don't have much advice.
When I want to search in related documents, it requires me to enter the whole word. If I write the word incomplete, it does not find the word in the search results
https://docs.abp.io/search/en/abp/7.1/?KeyWord=para
https://docs.abp.io/search/en/abp/7.1/?KeyWord=param
https://docs.abp.io/search/en/abp/7.1/?KeyWord=parameter
This is the behavior of Elastic search, I don't know much about it. : )
When I wanted to conduct research about this issue, I learned that I need to make changes in the ElasticSearchOption class, but since the ElasticSearchOption class is sealed, I cannot make any changes. Can you help me with this?