NYCComptroller / Checkbook

Source codes, data, and instructions for Checkbook
https://checkbooknyc.com/
Other
49 stars 20 forks source link

Smart Search issue with auto suggest. #33

Open Ramaraju-Kalidindi-REISYS opened 10 years ago

Ramaraju-Kalidindi-REISYS commented 10 years ago

the vendor Perfetto Enterprises Company Inc. seems to have 764,222 contracts. It actually has 27 contracts for FY 2014. This happened when we entered Google Inc. and Covanta into the smart search bar as well. Because it happens randomly, it is not easy to recreate the problem simply by searching by one of the vendors where we have seen the problem before.

Ramaraju-Kalidindi-REISYS commented 10 years ago

These are two different use cases. 1) if we choose "PERFETTOENTERPRISESCOMPANY INC" from the autocomplete box we get 27 results as we have narrowed down to a specific vendor http://checkbooknyc.com/smart_search?search_term=*|*vendor_names=perfetto%2Benterprises%2Bcompany%2Binc

2) If we type the full name "" in search box and hit search button the search is free text and search for all words "perfetto, enterprises, company and inc" in all text fields. http://checkbooknyc.com/smart_search?search_term=PERFETTO%2BENTERPRISES%2BCOMPANY%2BINC

The url in the search bar matches the second case. This what might have happened. a) The search bar value is populated from drop down. b) Then the focus is taken away from the search box using arrow keys or clicking anywhere else. c) Then the search bar treats the search as free text.

This was implemented by design. We will look at alternatives to change this behavior.

refer to this url for complete discussion on google groups. https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/checkbooknyc/iLNpOe1lGwU/81UstuzoYEMJ