meilisearch / docs-searchbar.js

Front-end search bar for documentation with Meilisearch

Home Page:https://www.meilisearch.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get grouped data

hawkeye64 opened this issue · comments

I have integrated Meilisearch. I scraped our markdown documentation myself. I have integrated docs-searchbar.js.
But, when I query my output is not "grouped" (like an SQL "group by")
Did I miss something in the scraping or is there something else I need to do?
My output:
image
But I want it to "group" like this:
image
my data looks like this:

  {
    "objectID": 133,
    "hierarchy_lvl0": "Contribution Guide",
    "hierarchy_lvl1": "Contribution Guide",
    "hierarchy_lvl2": "Helping to Resolve Existing Issues",
    "hierarchy_lvl3": null,
    "hierarchy_lvl4": "Testing Patches",
    "hierarchy_lvl5": null,
    "hierarchy_lvl6": null,
    "content": "You can also help out by examining pull requests that have been submitted to Quasar via GitHub. In order to apply someone's changes, you need to first create a dedicated branch: bash $ git checkout -b testing_branch Then, you can use their remote branch to update your codebase. For example, let's say the GitHub user JohnSmith has forked and pushed to a topic branch \"orange\" located at https://github.com/JohnSmith/quasar. bash $ git remote add JohnSmith https://github.com/JohnSmith/quasar.git $ git pull JohnSmith orange After applying their branch, test it out! Here are some things to think about: Does the change actually work? Does it have the proper documentation coverage? Should documentation elsewhere be updated? Do you like the implementation? Can you think of a nicer or faster way to implement a part of their change? Once you're happy that the pull request contains a good change, comment on the GitHub issue indicating your approval. Your comment should indicate that you like the change and what you like about it. Something like:  Example pull request comment I like the way you've restructured the code in card.vue - much nicer. Documentation is updated too.  If your comment simply reads \"+1\", then odds are that other reviewers aren't going to take it too seriously. Show that you took the time to review the pull request.",
    "anchor": "Testing-Patches",
    "url": "/contribution-guide/contribution-guide"
  },

As you can see, I have removed the hierarchy_radio_lvlX fields as I haven't figured out how they are to be used, so far.

Any help, suggestions, comments are welcomed. Thank you for your time and wonderful package.

I figured it out. It's all in the css.
image