Skip to content
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
8 changes: 2 additions & 6 deletions complaint_search/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
"company_response",
"complaint_id",
"complaint_what_happened",
"consumer_consent_provided",
"consumer_disputed",
"date_received",
"date_sent_to_company",
"has_narrative",
Expand All @@ -72,7 +70,7 @@

CSV_ORDERED_HEADERS = OrderedDict(
[
("date_received_formatted", "Date received"),
("date_received", "Date received"),
("product", "Product"),
("sub_product", "Sub-product"),
("issue", "Issue"),
Expand All @@ -83,12 +81,10 @@
("state", "State"),
("zip_code", "ZIP code"),
("tags", "Tags"),
("consumer_consent_provided", "Consumer consent provided?"),
("submitted_via", "Submitted via"),
("date_sent_to_company_formatted", "Date sent to company"),
("date_sent_to_company", "Date sent to company"),
("company_response", "Company response to consumer"),
("timely", "Timely response?"),
("consumer_disputed", "Consumer disputed?"),
("complaint_id", "Complaint ID"),
]
)
Expand Down
11 changes: 0 additions & 11 deletions complaint_search/es_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ class BaseBuilder(object):
"company",
"company_public_response",
"company_response",
"consumer_consent_provided",
"consumer_disputed",
"has_narrative",
"issue",
"product",
Expand All @@ -79,8 +77,6 @@ class BaseBuilder(object):
_OPTIONAL_FILTERS_PARAM_TO_ES_MAP = {
"company_public_response": "company_public_response.raw",
"company": "company.raw",
"consumer_consent_provided": "consumer_consent_provided.raw",
"consumer_disputed": "consumer_disputed.raw",
"issue": "issue.raw",
"product": "product.raw",
"sub_issue": "sub_issue.raw",
Expand Down Expand Up @@ -277,11 +273,6 @@ def _build_source(self):
source = list(SOURCE_FIELDS)
if self.params.get("format") in EXPORT_FORMATS:
source.remove("has_narrative")
if self.params.get("format") == "csv":
source.remove("date_received")
source.remove("date_sent_to_company")
source.append("date_received_formatted")
source.append("date_sent_to_company_formatted")
return source

def build(self):
Expand Down Expand Up @@ -326,8 +317,6 @@ class AggregationBuilder(BaseBuilder):
"company",
"company_public_response",
"company_response",
"consumer_consent_provided",
"consumer_disputed",
"has_narrative",
"issue",
"product",
Expand Down
12 changes: 0 additions & 12 deletions complaint_search/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,12 @@ class SearchInputSerializer(serializers.Serializer):
timely = serializers.ListField(
child=serializers.CharField(max_length=200), required=False
)
consumer_disputed = serializers.ListField(
child=serializers.CharField(max_length=200), required=False
)
company_response = serializers.ListField(
child=serializers.CharField(max_length=200), required=False
)
company_public_response = serializers.ListField(
child=serializers.CharField(max_length=200), required=False
)
consumer_consent_provided = serializers.ListField(
child=serializers.CharField(max_length=200), required=False
)
has_narrative = serializers.ListField(
child=serializers.CharField(max_length=200), required=False
)
Expand All @@ -116,12 +110,6 @@ class SearchInputSerializer(serializers.Serializer):
not_company_response = serializers.ListField(
child=serializers.CharField(max_length=200), required=False
)
not_consumer_consent_provided = serializers.ListField(
child=serializers.CharField(max_length=200), required=False
)
not_consumer_disputed = serializers.ListField(
child=serializers.CharField(max_length=200), required=False
)
not_issue = serializers.ListField(
child=serializers.CharField(max_length=200), required=False
)
Expand Down
Loading
Loading