Fix package search missing duplicate packages. #225

Implement package list with duplicate entries, use it when
initiating search from PackageCollection.
This commit is contained in:
Andrey Smirnov
2016-03-15 12:02:48 +03:00
parent bc438ff694
commit ff52d2655a
6 changed files with 115 additions and 8 deletions
+1 -1
View File
@@ -282,7 +282,7 @@ func (collection *PackageCollection) DeleteByKey(key []byte) error {
// Scan does full scan on all the packages
func (collection *PackageCollection) Scan(q PackageQuery) (result *PackageList) {
result = NewPackageList()
result = NewPackageListWithDuplicates(true, 0)
for _, key := range collection.db.KeysByPrefix([]byte("P")) {
pkg, err := collection.ByKey(key)