WhiteHouse / ndoch-hackathon

15 stars 14 forks source link

Allow case-insensitivity for title and body parameter of INDEX operation #16

Closed BigSauce closed 11 years ago

BigSauce commented 11 years ago

Currently, the title parameter, documented as follows:

string title GET (optional) Filters results by keyword or phrase in the Title.

is case-sensitive, in that the We the People API will only return titles which contain the case-sensitive title argument.

For example, if a developer searches for https://api.whitehouse.gov/v1/petitions.json?title=westboro, no results will be returned: {"metadata":{"responseInfo":{"status":200,"developerMessage":"OK"},"executionTime":0.02},"results":[],"noresults":1}

On the other hand, if a developer searches for https://api.whitehouse.gov/v1/petitions.json?title=Westboro or https://api.whitehouse.gov/v1/petitions.json?title=WESTBORO, then many petitions are returned.

Case-insensitivity for title and body searching should be default or be a provided as a parameter to developers who want case-insensitive searching in their apps. This would greatly simplify the developers workflow and can prevent frustrating cases where the the user cannot find a petition due to special casing.

One example would be where a user cannot find a petition containing "tornado" (case-insensitively) because the only petition containing "tornado" in the title actually contains "tOrnAdo", thus We the People API returns 0 results. This is a hypothetical example to illustrate my point.

welschp commented 11 years ago

Definitely on our radar, thanks for creating an issue on this.

ivanstegic commented 11 years ago

This is a duplicate issue of #12

theneonlobster commented 11 years ago

This issue was resolved in the last release.

BigSauce commented 11 years ago

Confirmed! Thanks!