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

Draft #67

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Draft #67

wants to merge 6 commits into from

Conversation

phillygogo
Copy link

Draf

//This will unset all results that aren't guide pages
//Then instantly re add to array which places them at the bottom.
foreach($records as $key => $wanted) {
if($wanted->ClassName != 'IntranetGuidePage') {
Copy link
Owner

Choose a reason for hiding this comment

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

@phillygogo Definitely should not be done in here :) Sorting can be set in Algolia directly.

@@ -68,6 +68,20 @@ function array_key_first(array $arr)
$record = $className::get()->byId($id);

if ($record && $record->canView()) {
// Snippet results are cofigured in Algolia to be returned.
// Since the following result is actually fetched from the DB
// I need to concatenate the aogolias snippeted result to the $hit to be returned

Choose a reason for hiding this comment

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

spelling mistake "algolia"

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.

3 participants