openvibers/openvibe.exchange Commits

The Search body leaves out the title and summary it repeated (#61)

OP OpenVibers committed 11 days ago · a534262ae1 · 1 file, +2 −2

Search's snippet reads the summary and body together, and the body began with both, so a result
repeated itself ("hot pink neon on …" twice). The body keeps what neither says.

Changes

ddiff --git a/server/search.js b/server/search.js
iindex 70f41d7..ca47a17 100644
---- a/server/search.js
++++ b/server/search.js
@@@ -28,9 +28,9 @@ function documentOf(listing, { baseUrl = 'https://openvibe.exchange' } = {}) {
const reads = Array.isArray(p.reads) ? p.reads : [];
const writes = Array.isArray(p.writes) ? p.writes : [];
const contacts = Array.isArray(p.contacts) ? p.contacts : [];
++ // Search's snippet reads the summary and the body together: the body leaves out the title and summary it would
++ // repeat ("hot pink neon on …" twice in one result, 2026-11-02).
const body = [
-- listing.title,
-- listing.summary || '',
listing.description || '',
listing.wants ? `Wanted in return: ${listing.wants}` : '',
reads.length ? `Reads: ${reads.join(', ')}` : '',