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

LOOP-992: Added fallback sorting of search results #167

Merged
merged 2 commits into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions config/sync/views.view.os2loop_search_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,30 @@ display:
expose:
label: Title
plugin_id: search_api
changed_1:
id: changed_1
table: search_api_index_os2loop_search_db_index
field: changed
relationship: none
group_type: group
admin_label: 'Changed (fallback)'
order: DESC
exposed: false
expose:
label: ''
plugin_id: search_api
title_1:
id: title_1
table: search_api_index_os2loop_search_db_index
field: title
relationship: none
group_type: group
admin_label: 'Title (fallback)'
order: ASC
exposed: false
expose:
label: ''
plugin_id: search_api
title: Search
header:
result:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ public function load() {
'os2loop_shared_profession' => [
'target_id' => $this->getReference('os2loop_profession:Andet')->id(),
],
'created' => (new \DateTimeImmutable('2001-01-01'))->getTimestamp(),
'changed' => (new \DateTimeImmutable('2001-01-03'))->getTimestamp(),
])->save();

// A post with "medicin" in content only.
Expand All @@ -161,6 +163,8 @@ public function load() {
'os2loop_shared_profession' => [
'target_id' => $this->getReference('os2loop_profession:Andet')->id(),
],
'created' => (new \DateTimeImmutable('2001-01-02'))->getTimestamp(),
'changed' => (new \DateTimeImmutable('2001-01-02'))->getTimestamp(),
])->save();
}

Expand Down