ladybug-tools / honeybee-core

:honeybee: honeybee core library
https://www.ladybug.tools/honeybee-core/docs/
GNU Affero General Public License v3.0
17 stars 15 forks source link

Search: any vs all keywords #586

Open cmsavage opened 1 year ago

cmsavage commented 1 year ago

The Search Construction component (and possibly others) allows for searching on multiple keywords. The descriptions suggest that constructions with any of the keywords will be returned, and the use of a function called any_keyword_in_string suggests that is the intent. However, that function actually uses the python all() function instead of any(): https://github.com/ladybug-tools/honeybee-core/blob/29bf4d498687ed5361ded31dd49d7023c7befec1/honeybee/search.py#L49

The result is that searching on multiple keywords tends to return no results instead of more results.