Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Added document type field in Solr statistics
  • Loading branch information
karanjeets committed Apr 17, 2017
1 parent 02edd39 commit 83f76b2ae979e3f10b6968741773c00da5df1b5e
Showing 2 changed files with 3 additions and 0 deletions.
@@ -318,6 +318,7 @@ def run(repos_list, output_dir):
stats["files"] = count_num_files(repository, ".git")

# Write data into Solr
stats["type"] = 'software'
stats_data = []
stats_data.append(stats)
json_data = json.dumps(stats_data)
@@ -372,6 +373,7 @@ def run(repos_list, output_dir):
for doc in docs:
fdata = {}
fdata['id'] = os.path.join(doc['filelocation'][0], doc['filename'][0])
fdata["type"] = 'file'
fdata['parent'] = repository
fdata['mimetype'] = doc['mimetype'][0]
fdata['license'] = rat_license[fdata['id']]
@@ -496,6 +496,7 @@

<!-- core CAS product attributes -->
<field name="id" type="string" indexed="true" stored="true" required="true" />
<field name="type" type="string" indexed="true" stored="true" />
<field name="crawl_start" type="date" indexed="true" stored="true" />
<field name="crawl_end" type="date" indexed="true" stored="true" />
<field name="index_start" type="date" indexed="true" stored="true" />

0 comments on commit 83f76b2

Please sign in to comment.