Add some tests in preparation for new ways of indexing words
This commit is contained in:
@@ -113,7 +113,7 @@ func (m *BookmarkManager) Search(opts SearchOptions) ([]entity.Bookmark, error)
|
||||
// first get a list of all the ids that match our query
|
||||
idsMatchingQuery := make([]uint64, 0, 0)
|
||||
counts := make(map[uint64]uint8)
|
||||
words := content.StringToSearchWords(opts.Query)
|
||||
words := content.StringToStemmedSearchWords(opts.Query)
|
||||
|
||||
for _, word := range words {
|
||||
var wi *entity.WordIndex
|
||||
|
||||
@@ -69,7 +69,6 @@ func (db *DB) UpdateIndexForWordsByID(words []string, id uint64) {
|
||||
|
||||
func (db *DB) DumpIndex() {
|
||||
|
||||
// delete this id from all indices
|
||||
err := db.store.ForEach(&bolthold.Query{}, func(wi *entity.WordIndex) error {
|
||||
log.Printf("%10s: %v", wi.Word, wi.Bitmap)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user