18F / fbopen

[DEPRECATED] An open API server, data import tools, and sample apps to help small businesses search for opportunities to work with the U.S. government.
Other
101 stars 45 forks source link

Bury NAICS filtering until we get it (and related, better solutions) working #47

Closed arowla closed 10 years ago

arowla commented 10 years ago

NAICS filtering is definitely not working right.

via @cjoh:

https://fbopen.gsa.gov/?q=web+design&data_source=&naics=541430&parent_only=&p=

Definitely not the results I'd hoped for. I added 541430 to an empty NAICS parameter up top. I think one thing you may want to do with NAICS is search for the original NAICS code the client asked for first. If that returns no results, I'd search within the 3 digit realm of that NAICS code (in this case 541). And if that returns no results, then don't return any results. If a NAICS code parameter is sent in, it really should limit scope.

One thing I learned from working at Jeeves is that it's better to return no results than it is bad results. No results means, to a user, change your query. Bad results means "slog through this stuff."

I modified this query to have a wildcard query string and return everything from this NAICS code (Graphic Design Services: http://www.naics.com/naics-code-description/?code=541430).

https://fbopen.gsa.gov/?q=*:*&data_source=&naics=541430&parent_only=&p=

This returns some super obvious false positives, such as "ACCUMULATOR, HYDRAUL (GAMBLE)", with a NAICS code of:

NAICS Code: 336 -- Transportation Equipment Manufacturing/336413 -- Other Aircraft Parts and Auxiliary Equipment Manufacturing

Obviously, this needs to be fixed or, if it can't be fixed, disabled. I think our first line of attack in the short term should just be to not add that parameter to the query string.

aaronsnow commented 10 years ago

Just to clarify: filtering works in the API, just not w/ on the website with the naics parameter.

I think the easiest fix is probably: in the html, change the naics form input field to FBO_NAICS, and in the javascript, addFBO_NAICS to the list of params that get passed through to the API call.

arowla commented 10 years ago

Yep. Your ticket's better. Closing this one.