olivernn / lunr.js

A bit like Solr, but much smaller and not as bright
http://lunrjs.com
MIT License
8.94k stars 548 forks source link

Complete set union is not complete #469

Closed bleroy closed 4 years ago

bleroy commented 4 years ago

A union with the complete set should be complete. Instead, the other set is returned. This hides another bug in search where clauseMatches is initialized with the complete set instead of the empty set.

olivernn commented 4 years ago

Hey, thanks for the fix, I've merged it now. Before I cut a new release though I'd like to understand this:

This hides another bug in search where clauseMatches is initialized with the complete set instead of the empty set.

Are you saying that there is a bug now that the the union of a complete set is fixed? Was that included in your change, or is there still work to be done?

bleroy commented 4 years ago

My fix is for both. It’s just that the second issue was hidden by the first one but both are fixed now.

bleroy commented 4 years ago

Second issue is fixed by starting from an empty set in index.js