RhoInc/CRANsearcher

Search term counts relate to intersection of search terms

Closed this issue · 1 comments

If you search with multiple search terms, the results are the intersection of the sets of packages corresponding to each search term. That is, the terms are ANDed together. The summary counts at the bottom of the panel are the counts of the search terms *within the intersection rather than within CRAN.

For example:

principal ==> There are 134 packages related to 'principal' on CRAN

component ==> There are 353 packages related to 'component' on CRAN

principal component ==> There are 104 packages related to 'principal component' on CRAN

principal, component ==> There are 113 packages related to 'principal' on CRAN. There are 113 packages related to 'component' on CRAN.

principal, component, breakfast ==> There are 0 packages related to 'principal' on CRAN. There are 0 packages related to 'component' on CRAN. There are 0 packages related to 'breakfast' on CRAN.

Because the search terms are ANDed and the search term counts are with in the intersection, the counts must always be identical for each of the search terms and equal to the number of results returned.

It would be more helpful if the search term counts were counts within CRAN rather than within the intersection. This would help in modifying the query - especially when the query returns zero results.

Also, the wording "on CRAN" is misleading because the count relates to the intersection rather than all of CRAN.

Hi @rgayler, thank you for this suggestion! As you pointed out in #16, there was a bug in the printing of the message showing the search result - the message was being repeated individually for each term, rather than once for the concatenated multiple terms. This bug has since been fixed in our most recent GitHub release. The intent was to show results for intersection of search terms, which is hopefully made clear now with this release. For your example of "principal, component", the message will now show:
"There are 114 packages related to 'principal, component' on CRAN (as of yyyy-mm-dd)."

Again, thank you for your help with identifying issues and making suggestions. Please let us know if you have any further questions or ideas about this one.