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

Entities search #2643

Merged
merged 10 commits into from
Jul 11, 2024
Merged

Entities search #2643

merged 10 commits into from
Jul 11, 2024

Conversation

kelvin-muchiri
Copy link
Contributor

@kelvin-muchiri kelvin-muchiri commented Jul 10, 2024

Changes / Features implemented

Add search filter support for Entities

Steps taken to verify this change does what is intended

  • QA

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

@faith-mutua
Copy link

@kelvin-muchiri this is working as expected
Screenshot from 2024-07-11 10-28-44

if search:
queryset = queryset.filter(Q(json__iregex=search) | Q(uuid=search))

queryset = queryset.order_by("id")
Copy link
Member

Choose a reason for hiding this comment

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

Is the order by necessary? Is it likely to be a performance bottleneck?

Copy link
Contributor Author

@kelvin-muchiri kelvin-muchiri Jul 11, 2024

Choose a reason for hiding this comment

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

@ukanga Even if we choose not to order by default but it will still be required if pagination is applied

Copy link
Contributor

Choose a reason for hiding this comment

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

@kelvin-muchiri we fetch this data paginated

@kelvin-muchiri kelvin-muchiri merged commit 5ac0861 into main Jul 11, 2024
10 checks passed
@kelvin-muchiri kelvin-muchiri deleted the entities-search branch July 11, 2024 11:59
@FrankApiyo FrankApiyo mentioned this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants