Subversion Repositories SmartDukaan

Rev

Rev 20571 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20571 Rev 20592
Line 27... Line 27...
27
            os.remove(os.path.expanduser(filePath))
27
            os.remove(os.path.expanduser(filePath))
28
        except OSError:
28
        except OSError:
29
            pass
29
            pass
30
    output = open(filePath, 'ab+')
30
    output = open(filePath, 'ab+')
31
    all = get_mongo_connection().Hotspot.HotspotEntity.find()
31
    all = get_mongo_connection().Hotspot.HotspotEntity.find()
32
    autoSuggestList = []
32
    autoSuggestMap = {}
33
    for a in all:
33
    for a in all:
34
        autoSuggestList.append(a['title'])
34
        autoSuggestMap[a['title']] = [a['title']]
35
    json.dump(autoSuggestList, output)
35
    json.dump(autoSuggestMap, output)
36
 
36
 
37
def alter_solr_xml():
37
def alter_solr_xml():
38
    all = get_mongo_connection().Hotspot.HotspotEntity.find()
38
    all = get_mongo_connection().Hotspot.HotspotEntity.find()
39
    for a in all:
39
    for a in all:
40
        fileName = str(a['_id'])+"_irdata_solr.xml"
40
        fileName = str(a['_id'])+"_irdata_solr.xml"