Skip to content
This repository has been archived by the owner. It is now read-only.

Include duplicate_of in need search results #66

Merged
merged 1 commit into from Oct 3, 2014
Merged

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Oct 3, 2014

Without the duplicate_of field Maslow’s search results table misrepresents duplicate needs by showing an empty “Decision made” column.

Fixes https://www.pivotaltracker.com/story/show/78193142

Before:
screen shot 2014-10-03 at 14 17 19

After:
screen shot 2014-10-03 at 14 17 12

Without the “duplicate_of” field Maslow’s search results table
misrepresents duplicate needs by showing an empty “Decision made” column

Fixes 78193142
@@ -24,6 +24,7 @@ def self.fields
Field.new(:legislation, "string", false, false),
Field.new(:other_evidence, "string", true, true),
Field.new(:in_scope, "boolean", false, false),
Field.new(:duplicate_of, "string", false, false),

This comment has been minimized.

@bradwright

bradwright Oct 3, 2014
Contributor

@rboulton do you have any reckons on sending an integer as a string? I assume it's fine but just want to check.

This comment has been minimized.

@fofr

fofr Oct 3, 2014
Author Contributor

Might be better as long, which matches how we send need_ids, although duplicate_of can also be nil which I presume is fine.

This comment has been minimized.

@rboulton

rboulton Oct 3, 2014
Contributor

String is totally fine since the only operation that'll be done on this is looking up exact values. Integer types are indexed to allow for efficient range and sort operations, which would be just a bit of a waste here (though not a problem either).

@bradwright
Copy link
Contributor

@bradwright bradwright commented Oct 3, 2014

Looks good code-wise, do we need to add a migration to re-populate the index with missing things?

@fofr
Copy link
Contributor Author

@fofr fofr commented Oct 3, 2014

I'm not sure about migrations for re-populating. @JordanHatch or @fatbusinessman should know.

@JordanHatch
Copy link
Contributor

@JordanHatch JordanHatch commented Oct 3, 2014

You'll probably want to run rake search:index_needs once this has been deployed, but this would be better ran as a manual task rather than an automatic migration.

rboulton added a commit that referenced this pull request Oct 3, 2014
Include duplicate_of in need search results
@rboulton rboulton merged commit 9653723 into master Oct 3, 2014
1 check passed
1 check passed
default "Build #52 succeeded on Jenkins"
Details
@rboulton rboulton deleted the index-duplicate-metadata branch Oct 3, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.