iDigBio / idigbio-search-api

Server-side code driving iDigBio's search functionality.
GNU General Public License v3.0
24 stars 5 forks source link

Using both fields and fields_exclude in searchs for media gives unexpected results #11

Closed mjcollin closed 9 years ago

mjcollin commented 9 years ago

When running a media search, specifying a fields_exclude parameter turns fields into a list of excluded fields. Specifying only fields or fields_exclude works correctly:

Good:

http://beta-search.idigbio.org/v2/search/media/?rq={%22genus%22:%22cortinarius%22}&fields=[%22datemodified%22]&sort=%22uuid%22&limit=1

http://beta-search.idigbio.org/v2/search/media/?rq={%22genus%22:%22cortinarius%22}&fields_exclude=[%22data%22]&sort=%22uuid%22&limit=1

Bad:

http://beta-search.idigbio.org/v2/search/media/?rq={%22genus%22:%22cortinarius%22}&fields=[%22datemodified%22]&fields_exclude=[%22data%22]&sort=%22uuid%22&limit=1

godfoder commented 9 years ago

fixed in latest commit.