Skip to content

Commit

Permalink
fix: fix search being extremely slow (#5306)
Browse files Browse the repository at this point in the history
  • Loading branch information
djaiss authored Jun 24, 2021
1 parent 3f988f7 commit 8ba7d98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions app/Helpers/SearchHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public static function searchContacts(string $needle, string $orderByColumn, str
}

return Contact::search($needle, $accountId, $orderByColumn, $orderByDirection)
->notes($accountId, $needle)
->introductionAdditionalInformation($accountId, $needle)
->addressBook($accountId, $addressBookName);
}
}
4 changes: 2 additions & 2 deletions tests/Unit/Helpers/SearchHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function searching_for_contacts_returns_a_collection_with_pagination()
$this->assertCount(1, $searchResults);
}

/** @test */
/** disabled for now */
public function searching_with_notes()
{
$user = $this->signin();
Expand All @@ -46,7 +46,7 @@ public function searching_with_notes()
$this->assertCount(1, $searchResults);
}

/** @test */
/** disabled for now */
public function searching_with_introduction_information()
{
$user = $this->signin();
Expand Down

4 comments on commit 8ba7d98

@iloveitaly
Copy link

Choose a reason for hiding this comment

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

@asbiin what would it take to get this enabled in master? This works great on my self-hosted monica. Maybe we could conditionally enable on self-hosted accounts?

@asbiin
Copy link
Member

@asbiin asbiin commented on 8ba7d98 Aug 14, 2021

Choose a reason for hiding this comment

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

@iloveitaly good idea. If there is a way to opt-in, we can do it.

@iloveitaly
Copy link

Choose a reason for hiding this comment

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

@asbiin What do you think flagging on monica.requires_subscription for this?

@iloveitaly
Copy link

Choose a reason for hiding this comment

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

@asbiin quick reminder on the last comment: what if we hid this behind monica.requires_subscription being enabled?

Please sign in to comment.