[ 
https://issues.apache.org/jira/browse/CAMEL-15335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17175069#comment-17175069
 ] 

ASF GitHub Bot commented on CAMEL-15335:
----------------------------------------

zregvart commented on a change in pull request #444:
URL: https://github.com/apache/camel-website/pull/444#discussion_r468195526



##########
File path: antora-ui-camel/src/js/vendor/algoliasearch.bundle.js
##########
@@ -46,22 +46,22 @@
         cancel.style.display = 'block'
         index
           .search(search.value, {
-            hitsPerPage: 10,
+            hitsPerPage: 5,
           })
           .then((results) => {
             const hits = results.hits
             const data = hits.reduce((data, hit) => {
               const d = {}
               d.url = hit.url
               var section = hit.hierarchy.lvl0
-              if (hit.hierarchy.lvl6 !== null) section = section + ' [' + 
hit.hierarchy.lvl6 + ']'
+              if (hit.hierarchy.lvl6 !== null) section = section + '/' + 
hit.hierarchy.lvl6
               var breadcrumbs = Object.values(hit.hierarchy)
                 .slice(1)
                 .filter((lvl) => lvl !== null)
-                .join(' » ')
+                .join(' / ')
 
               d.breadcrumbs = ((breadcrumbs !== '') ? breadcrumbs : section)
-              d.snippet = hit._snippetResult.content.value + '...'
+              d.snippet = 
hit._snippetResult.content.value.split('"').join('') + '...'

Review comment:
       Seems that `hit._snippetResult` can be undefined, are we using 
`d.snippet`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Search Result Layout
> --------------------
>
>                 Key: CAMEL-15335
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15335
>             Project: Camel
>          Issue Type: Improvement
>          Components: website
>            Reporter: Aemie
>            Priority: Major
>         Attachments: algolia-result.png, bootstrap-result.png, 
> distributeData.js, search-result#1.png, search-result#3.png, 
> search-result-design#2.png
>
>
> The current search result design doesn't fit entirely with the website 
> design. Thus, I wanted to introduce a few changes to how we present it. Also, 
> in addition to I would like to suggest that we include only the top 5 or top 
> 6 results and not 10 as the pages are ranked by weight based on the search 
> query and presented so a good practice would show fewer results which are 
> precise.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to