Skip to content

Commit 6d9b975

Browse files
authored
Remove fulltext (#638)
1 parent 03446fd commit 6d9b975

File tree

8 files changed

+0
-18
lines changed

8 files changed

+0
-18
lines changed

src/domain/proposal.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export class IPFSData {
2222
public title: string;
2323
public description: string;
2424
public url: string;
25-
public fulltext: string[];
2625
public tags: JSONValue[];
2726
}
2827

@@ -79,7 +78,6 @@ export function getProposalIPFSData(proposal: Proposal): Proposal {
7978
proposal.title = data.title;
8079
proposal.description = data.description;
8180
proposal.url = data.url;
82-
proposal.fulltext = data.fulltext;
8381
let tagsObjects = data.tags;
8482
if (tagsObjects.length > 0) {
8583
let tags: string[] = [];
@@ -114,7 +112,6 @@ export function getIPFSData(descHash: string): IPFSData {
114112
result.title = '';
115113
result.description = '';
116114
result.url = '';
117-
result.fulltext = [];
118115
result.tags = [];
119116

120117
let ipfsData = ipfs.cat('/ipfs/' + descHash);
@@ -136,12 +133,10 @@ export function getIPFSData(descHash: string): IPFSData {
136133
}
137134
if (descJson.toObject().get('title') != null && descJson.toObject().get('title').kind === JSONValueKind.STRING) {
138135
result.title = descJson.toObject().get('title').toString();
139-
result.fulltext = result.title.split(' ');
140136
}
141137
if (descJson.toObject().get('description') != null &&
142138
descJson.toObject().get('description').kind === JSONValueKind.STRING) {
143139
result.description = descJson.toObject().get('description').toString();
144-
result.fulltext = result.fulltext.concat(result.description.split(' '));
145140
}
146141
if (descJson.toObject().get('url') != null &&
147142
descJson.toObject().get('url').kind === JSONValueKind.STRING) {

src/domain/schema.graphql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ type Proposal @entity {
7878
description: String
7979
url: String
8080
tags: [Tag!]
81-
fulltext: [String!]
8281

8382
gpRewards: [GPReward!] @derivedFrom(field: "proposal")
8483
accountsWithUnclaimedRewards: [Bytes!]

src/mappings/Competition/mapping.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export function getSuggestionIPFSData(suggestion: CompetitionSuggestion): Compet
9595
suggestion.title = data.title;
9696
suggestion.description = data.description;
9797
suggestion.url = data.url;
98-
suggestion.fulltext = data.fulltext;
9998
let tagsObjects = data.tags;
10099
if (tagsObjects.length > 0) {
101100
let tags: string[] = [];

src/mappings/Competition/schema.graphql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ type CompetitionSuggestion @entity {
3030
title: String
3131
description: String
3232
url: String
33-
fulltext: [String!]
3433
tags: [Tag!]
3534
suggester: Bytes!
3635
beneficiary: Bytes!

test/0.0.1-rc.16/domain.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ describe('Domain Layer', () => {
435435
descriptionHash
436436
title
437437
description
438-
fulltext
439438
url
440439
tags {
441440
id
@@ -552,7 +551,6 @@ describe('Domain Layer', () => {
552551
descriptionHash: descHash,
553552
title: proposalTitle,
554553
description: proposalDescription,
555-
fulltext: proposalTitle.split(' ').concat(proposalDescription.split(' ')),
556554
url: proposalUrl,
557555
tags: tagsList,
558556
stage: 'Queued',

test/0.0.1-rc.19/domain.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,6 @@ describe('Domain Layer', () => {
442442
descriptionHash
443443
title
444444
description
445-
fulltext
446445
url
447446
tags {
448447
id
@@ -559,7 +558,6 @@ describe('Domain Layer', () => {
559558
descriptionHash: descHash,
560559
title: proposalTitle,
561560
description: proposalDescription,
562-
fulltext: proposalTitle.split(' ').concat(proposalDescription.split(' ')),
563561
url: proposalUrl,
564562
tags: tagsList,
565563
stage: 'Queued',

test/0.0.1-rc.41/Competition.spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ describe('Competition', () => {
260260
descriptionHash
261261
title
262262
description
263-
fulltext
264263
url
265264
tags {
266265
id
@@ -295,7 +294,6 @@ describe('Competition', () => {
295294
descriptionHash: descHash,
296295
title: proposalTitle,
297296
description: proposalDescription,
298-
fulltext: proposalTitle.split(' ').concat(proposalDescription.split(' ')),
299297
url: proposalUrl,
300298
tags: tagsList,
301299
suggester: accounts[0].address.toLowerCase(),
@@ -327,7 +325,6 @@ describe('Competition', () => {
327325
descriptionHash: descHash,
328326
title: proposalTitle,
329327
description: proposalDescription,
330-
fulltext: proposalTitle.split(' ').concat(proposalDescription.split(' ')),
331328
url: proposalUrl,
332329
tags: tagsList,
333330
suggester: accounts[0].address.toLowerCase(),

test/0.0.1-rc.55/CompetitionFactory.spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ describe('CompetitionFactory', () => {
353353
descriptionHash
354354
title
355355
description
356-
fulltext
357356
url
358357
suggester
359358
beneficiary
@@ -374,7 +373,6 @@ describe('CompetitionFactory', () => {
374373
descriptionHash: descHash,
375374
title: proposalTitle,
376375
description: proposalDescription,
377-
fulltext: proposalTitle.split(' ').concat(proposalDescription.split(' ')),
378376
url: proposalUrl,
379377
suggester: accounts[0].address.toLowerCase(),
380378
beneficiary: accounts[1].address.toLowerCase(),
@@ -398,7 +396,6 @@ describe('CompetitionFactory', () => {
398396
descriptionHash: descHash,
399397
title: proposalTitle,
400398
description: proposalDescription,
401-
fulltext: proposalTitle.split(' ').concat(proposalDescription.split(' ')),
402399
url: proposalUrl,
403400
suggester: accounts[0].address.toLowerCase(),
404401
beneficiary: accounts[0].address.toLowerCase(),

0 commit comments

Comments
 (0)