Subversion Repositories SmartDukaan

Rev

Rev 285 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 285 Rev 293
Line 14... Line 14...
14
da = DataHelper()
14
da = DataHelper()
15
da.initxy()
15
da.initxy()
16
 
16
 
17
analyzer = lucene.StandardAnalyzer()
17
analyzer = lucene.StandardAnalyzer()
18
# Creating the Index
18
# Creating the Index
-
 
19
index = os.getcwd()
19
path_index1 = ds+"home"+ds+"gaurav"+ds+"code" + ds + "infibeamindex"
20
path_index1 = index + ds + "infibeamindex"
20
#Create the Index Writer
21
#Create the Index Writer
21
writer = lucene.IndexWriter(path_index1,analyzer,True) 
22
writer = lucene.IndexWriter(path_index1,analyzer,True) 
22
 
23
 
23
 
24
 
24
phones = da.get_all_infibeam_data()
25
phones = da.get_all_infibeam_data()
Line 33... Line 34...
33
    #print "id " + str(doc.getField("ID")) + " name " + str(doc.getField("name")) + " price " + str(doc.getField("price"))
34
    #print "id " + str(doc.getField("ID")) + " name " + str(doc.getField("name")) + " price " + str(doc.getField("price"))
34
    writer.addDocument(doc)
35
    writer.addDocument(doc)
35
    #print str(writer.docCount())
36
    #print str(writer.docCount())
36
writer.close()
37
writer.close()
37
 
38
 
38
path_index2 = ds+"home"+ds+"gaurav"+ds+"code" + ds + "indiaplazaindex"
39
path_index2 = index + ds + "indiaplazaindex"
39
#Create the Index Writer
40
#Create the Index Writer
40
writer = lucene.IndexWriter(path_index2,analyzer,True) 
41
writer = lucene.IndexWriter(path_index2,analyzer,True) 
41
 
42
 
42
phones = da.get_all_indiaplaza_phones()
43
phones = da.get_all_indiaplaza_phones()
43
for p in phones:
44
for p in phones:
Line 52... Line 53...
52
    writer.addDocument(doc)
53
    writer.addDocument(doc)
53
    #print str(writer.docCount())
54
    #print str(writer.docCount())
54
writer.close()  
55
writer.close()  
55
 
56
 
56
  
57
  
57
path_index3 = ds+"home"+ds+"gaurav"+ds+"code" + ds + "univercellindex"
58
path_index3 = index + ds + "univercellindex"
58
#Create the Index Writer
59
#Create the Index Writer
59
writer = lucene.IndexWriter(path_index3,analyzer,True) 
60
writer = lucene.IndexWriter(path_index3,analyzer,True) 
60
 
61
 
61
phones = da.get_all_univercell_phones()
62
phones = da.get_all_univercell_phones()
62
for p in phones:
63
for p in phones:
Line 71... Line 72...
71
    writer.addDocument(doc)
72
    writer.addDocument(doc)
72
    #print str(writer.docCount())
73
    #print str(writer.docCount())
73
writer.close()    
74
writer.close()    
74
 
75
 
75
 
76
 
76
path_index4 = ds+"home"+ds+"gaurav"+ds+"code" + ds + "babuchakindex"
77
path_index4 = index + ds + "babuchakindex"
77
#Create the Index Writer
78
#Create the Index Writer
78
writer = lucene.IndexWriter(path_index4,analyzer,True) 
79
writer = lucene.IndexWriter(path_index4,analyzer,True) 
79
 
80
 
80
phones = da.get_allbabuchakphones()
81
phones = da.get_allbabuchakphones()
81
for p in phones:
82
for p in phones:
Line 89... Line 90...
89
    #print "id " + str(doc.getField("ID")) + " name " + str(doc.getField("name")) + " price " + str(doc.getField("price"))
90
    #print "id " + str(doc.getField("ID")) + " name " + str(doc.getField("name")) + " price " + str(doc.getField("price"))
90
    writer.addDocument(doc)
91
    writer.addDocument(doc)
91
    #print str(writer.docCount())
92
    #print str(writer.docCount())
92
writer.close()    
93
writer.close()    
93
 
94
 
94
path_index5 = ds+"home"+ds+"gaurav"+ds+"code" + ds + "naaptolindex"
95
path_index5 = index + ds + "naaptolindex"
95
#Create the Index Writer
96
#Create the Index Writer
96
writer = lucene.IndexWriter(path_index5,analyzer,True) 
97
writer = lucene.IndexWriter(path_index5,analyzer,True) 
97
 
98
 
98
phones = da.get_allnaaptolphones()
99
phones = da.get_allnaaptolphones()
99
for p in phones:
100
for p in phones:
Line 108... Line 109...
108
    writer.addDocument(doc)
109
    writer.addDocument(doc)
109
    #print str(writer.docCount())
110
    #print str(writer.docCount())
110
writer.close()   
111
writer.close()   
111
 
112
 
112
 
113
 
113
path_index6 = ds+"home"+ds+"gaurav"+ds+"code" + ds + "mobstoreindex"
114
path_index6 = index + ds + "mobstoreindex"
114
#Create the Index Writer
115
#Create the Index Writer
115
writer = lucene.IndexWriter(path_index6,analyzer,True) 
116
writer = lucene.IndexWriter(path_index6,analyzer,True) 
116
 
117
 
117
phones = da.get_allmobstorephones_new()
118
phones = da.get_allmobstorephones_new()
118
for p in phones:
119
for p in phones: