1
0
Fork 0
mirror of https://github.com/vbatts/imgsrv.git synced 2025-07-29 02:10:29 +00:00

now images are lower cased, and searching for names is insensitive.

for your mongo db set, run:
db.fs.files.find().forEach(
  function(e) {
    e.filename = e.filename.toLowerCase();
    db.fs.files.save(e);
  }
)
This commit is contained in:
Vincent Batts 2013-08-06 10:37:58 -04:00
parent 80e9381754
commit 5eab319c6c
4 changed files with 33 additions and 25 deletions

View file

@ -65,7 +65,7 @@ func (u Util) HasFileByKeyword(keyword string) (exists bool, err error) {
/*
get a list of keywords and their frequency count
*/
func (u Util) GetKeywords() (kp []types.KeywordCount, err error) {
func (u Util) GetKeywords() (kp []types.IdCount, err error) {
job := &mgo.MapReduce{
Map: `
function() {