konklone / oversight.garden

Bringing together the oversight community's work.
https://oversight.garden
Creative Commons Zero v1.0 Universal
26 stars 9 forks source link

Error handling: array in lieu of query string #140

Closed divergentdave closed 8 years ago

divergentdave commented 8 years ago

Following up from #139, http://localhost:3000/reports?query=&query= results in a query parsing exception from elasticsearch, because express returns an array for query, and the query_string query doesn't support arrays. It looks like we might have produced bogus links at some point in the past, where the whole query string was repeated two or three times, and the search engine crawlers picked up on that.

Edit: example: /reports.xml?page=18&query=&inspector=education?page=18&query=&inspector=education

divergentdave commented 8 years ago

After some extensive searching, I can't figure out what would have led to doubling the query string. My best hypothesis is that it came from logic (or a bug) in the search engine crawler.