Skip to content

Commit

Permalink
Merge pull request #3278 from fecgov/feature/2991-global-site-search
Browse files Browse the repository at this point in the history
Updates for global site search
  • Loading branch information
patphongs authored Oct 22, 2019
2 parents 090a6fc + c5742ee commit c713a19
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 208 deletions.
3 changes: 2 additions & 1 deletion fec/fec/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@
SEARCH_DESCENDANTS_OF = [
'/home/legal-resources/',
'/home/help-candidates-and-committees/',
'/home/press/'
'/home/press/',
'/home/introduction-campaign-finance/'
]

# These are the parent pages for which we want *only* direct children
Expand Down
13 changes: 0 additions & 13 deletions fec/search/management/commands/index_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

from home.models import Page


DIGITALGOV_DRAWER_KEY_TRANSITION = settings.FEC_DIGITALGOV_DRAWER_KEY_TRANSITION
drawer = settings.DIGITALGOV_DRAWER_HANDLE
key = settings.FEC_DIGITALGOV_DRAWER_KEY_MAIN

Expand All @@ -23,20 +21,9 @@ def add_arguments(self, parser):
help='Path to JSON file to load'
)

parser.add_argument(
'-transition',
action='store_true',
help="Add this flag to add to the transition drawer"
)

def handle(self, *args, **options):
self.stdout.write(self.style.WARNING('Indexing pages'))

# If we're putting in the transition drawer, use those creds
if options['transition']:
drawer = 'transition'
key = DIGITALGOV_DRAWER_KEY_TRANSITION

if options['json_file_path']:
file_name = options['json_file_path']
else:
Expand Down
161 changes: 0 additions & 161 deletions fec/search/management/data/transition_pages.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
[
{
"document_id": "transition-1",
"path": "http://transition.fec.gov/pubrec/publicrecordsoffice.shtml#using",
"created": "04/01/2017",
"language": "en",
"title": "Public Records Office"
},
{
"document_id": "transition-2",
"path": "http://transition.fec.gov/info/hearings.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Public Hearings"
},
{
"document_id": "transition-3",
"path": "http://transition.fec.gov/af/af.shtml",
"created": "04/01/2017",
"language": "en",
"title": "FEC Administrative Fine Program"
},
{
"document_id": "transition-4",
"path": "http://transition.fec.gov/af/AFPRegulations.shtml",
"created": "04/01/2017",
"language": "en",
"title": "AFP Regulations"
},
{
"document_id": "transition-5",
"path": "http://transition.fec.gov/af/af_calc.shtml",
Expand Down Expand Up @@ -69,97 +48,20 @@
"language": "en",
"title": "Help Complying with the Federal Campaign Finance Law (FECA)"
},
{
"document_id": "transition-11",
"path": "http://transition.fec.gov/elecfil/electron.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Electronic Filing"
},
{
"document_id": "transition-12",
"path": "http://transition.fec.gov/elecfil/electron.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Electronic Filing"
},
{
"document_id": "transition-13",
"path": "http://transition.fec.gov/info/forms.shtml",
"created": "04/01/2017",
"language": "en",
"title": "FEC Reporting Forms"
},
{
"document_id": "transition-14",
"path": "http://transition.fec.gov/info/ElectionDate/",
"created": "04/01/2017",
"language": "en",
"title": "Federal Election Compliance Information"
},
{
"document_id": "transition-15",
"path": "http://transition.fec.gov/info/publications.shtml",
"created": "04/01/2017",
"language": "en",
"title": "FEC Publications"
},
{
"document_id": "transition-16",
"path": "http://transition.fec.gov/info/publications.shtml",
"created": "04/01/2017",
"language": "en",
"title": "FEC Publications"
},
{
"document_id": "transition-17",
"path": "http://transition.fec.gov/pages/brochures/brochures.shtml",
"created": "04/01/2017",
"language": "en",
"title": "FEC Brochures"
},
{
"document_id": "transition-18",
"path": "http://transition.fec.gov/pages/bcra/bcra_update.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Bipartisan Campaign Reform Act of 2002"
},
{
"document_id": "transition-19",
"path": "http://transition.fec.gov/info/outreach.shtml",
"created": "04/01/2017",
"language": "en",
"title": "FEC Educational Outreach"
},
{
"document_id": "transition-20",
"path": "http://transition.fec.gov/info/elearning.shtml",
"created": "04/01/2017",
"language": "en",
"title": "FEC Educational Outreach"
},
{
"document_id": "transition-21",
"path": "http://transition.fec.gov/info/outreach.shtml#conferences",
"created": "04/01/2017",
"language": "en",
"title": "FEC Educational Outreach"
},
{
"document_id": "transition-22",
"path": "http://transition.fec.gov/info/outreach.shtml#roundtables",
"created": "04/01/2017",
"language": "en",
"title": "FEC Educational Outreach"
},
{
"document_id": "transition-23",
"path": "http://transition.fec.gov/info/outreach.shtml#appearances",
"created": "04/01/2017",
"language": "en",
"title": "FEC Educational Outreach"
},
{
"document_id": "transition-24",
"path": "http://transition.fec.gov/rad/index.shtml",
Expand Down Expand Up @@ -222,68 +124,5 @@
"created": "04/01/2017",
"language": "en",
"title": "Federal Election Commission Home Page"
},
{
"document_id": "transition-33",
"path": "http://transition.fec.gov/ans/answers.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Quick Answers"
},
{
"document_id": "transition-34",
"path": "http://transition.fec.gov/ans/answers_general.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Quick Answers-General Questions"
},
{
"document_id": "transition-35",
"path": "http://transition.fec.gov/ans/answers_disclosure.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Quick Answers - Disclosure"
},
{
"document_id": "transition-36",
"path": "http://transition.fec.gov/ans/answers_compliance.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Quick Answers - Compliance"
},
{
"document_id": "transition-37",
"path": "http://transition.fec.gov/ans/answers_filing.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Quick Answers - Filing"
},
{
"document_id": "transition-38",
"path": "http://transition.fec.gov/ans/answers_candidate.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Quick Answers - Candidate"
},
{
"document_id": "transition-39",
"path": "http://transition.fec.gov/ans/answers_pac.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Quick Answers - PAC"
},
{
"document_id": "transition-40",
"path": "http://transition.fec.gov/ans/answers_party.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Quick Answers - Party"
},
{
"document_id": "transition-41",
"path": "http://transition.fec.gov/ans/answers_public_funding.shtml",
"created": "04/01/2017",
"language": "en",
"title": "Quick Answers: Public Funding"
}
]
Loading

0 comments on commit c713a19

Please sign in to comment.