Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: custom search drivers #3034

Merged
merged 5 commits into from
Jul 22, 2024
Merged

feature: custom search drivers #3034

merged 5 commits into from
Jul 22, 2024

Conversation

Paul-Bob
Copy link
Contributor

@Paul-Bob Paul-Bob commented Jul 21, 2024

Description

Fixes #3012

  self.search = {
    query: -> {
      array = []

      30.times do |iteration|
        array << {
          _id: iteration,
          _label: "Label nr #{iteration}",
          _url: "https://#{iteration}.ro"
        }
      end

      array
    }
  }
search_results.webm

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@Paul-Bob Paul-Bob self-assigned this Jul 21, 2024
Copy link

codeclimate bot commented Jul 21, 2024

Code Climate has analyzed commit e68f696 and detected 0 issues on this pull request.

View more on Code Climate.

end

# Force count to 0 until implement an API to pass the count
results_count = 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this hidden to the user or can they see (0) in the search results?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is hidden. The count is added only when bigger than 0:

      if results_count > 0
        header = "#{header} (#{results_count})"
      end

@Paul-Bob Paul-Bob merged commit 8144317 into main Jul 22, 2024
22 checks passed
@Paul-Bob Paul-Bob deleted the feature/custom_search_results branch July 22, 2024 20:57
Copy link
Contributor

This PR has been merged into main. The functionality will be available in the next release.

Please check the release guide for more information.

@Paul-Bob Paul-Bob mentioned this pull request Jul 24, 2024
@adrianthedev adrianthedev changed the title feature: custom search results feature: custom search drivers Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement support for custom search system
2 participants