From f3b94e14c5c48435d8519ea2f5b11870814a469c Mon Sep 17 00:00:00 2001 From: zhanyun Date: Mon, 29 Aug 2016 08:46:00 +0800 Subject: [PATCH] trustie2 relative_memos attributes fixed --- .../open_source_projects_controller.rb | 10 +- .../controllers/relative_memos_controller.rb | 10 +- trustie2/app/models/open_source_project.rb | 4 +- trustie2/app/models/relative_memo.rb | 6 +- .../open_source_projects/_os_project.html.erb | 2 +- .../_os_project_search_list.html.erb | 4 +- .../open_source_projects/_show_memo.html.erb | 2 +- .../open_source_projects/_show_memos.html.erb | 2 +- .../_show_topics.html.erb | 4 +- .../show_memos_by_type.html.erb | 20 +-- .../views/relative_memos/_show_memo.html.erb | 20 +-- .../app/views/relative_memos/search.html.erb | 20 +-- trustie2/app/views/tags/_show_topics.html.erb | 4 +- trustie2/config/locales/zh.yml | 2 +- ...0140827064358_changes_to_relative_memos.rb | 2 +- ...and_replies_num_to_relative_memo_to_osp.rb | 2 +- ...plies_num_index_to_relative_memo_to_osp.rb | 2 +- ...e_relative_memo_to_osp_to_relative_memo.rb | 6 +- .../migrate/20141117134250_add_info_to_osp.rb | 2 +- ...50713121254_add_match_result_part_table.rb | 140 ++++++++--------- trustie2/db/ossean_production.sql | 146 +++++++++--------- trustie2/solr/conf/solrconfig.xml | 2 +- 22 files changed, 206 insertions(+), 206 deletions(-) diff --git a/trustie2/app/controllers/open_source_projects_controller.rb b/trustie2/app/controllers/open_source_projects_controller.rb index 1a95964..74a0ad4 100644 --- a/trustie2/app/controllers/open_source_projects_controller.rb +++ b/trustie2/app/controllers/open_source_projects_controller.rb @@ -58,7 +58,7 @@ class OpenSourceProjectsController < ApplicationController else per_page_option = 10 - #@open_source_project.update_column(:view_num_local, (@open_source_project.view_num_local.to_i+1)) + #@open_source_project.update_column(:view_num_ossean, (@open_source_project.view_num_ossean.to_i+1)) #@open_source_project.save @pops=@open_source_project.open_source_project_popularities.where("year_col >= 2013").order("year_col ASC, month_col ASC") @hot_words=@open_source_project.hot_words @@ -234,7 +234,7 @@ class OpenSourceProjectsController < ApplicationController #adjust_solr_params do |params| # params[:q] += " AND something_s:more" #end - #order_by_function(:sum, :view_num_local, [:product, :composite_score, '0.01'], :desc) + #order_by_function(:sum, :view_num_ossean, [:product, :composite_score, '0.01'], :desc) if "".eql?(search_words) order_by(:composite_score, :desc) else @@ -524,9 +524,9 @@ class OpenSourceProjectsController < ApplicationController @posts = RelativeMemoToOpenSourceProject.includes(:relative_memos).where(osp_id: @open_source_project.id, memo_type: 'topic').order('created_time DESC').limit(size) @posts_count = RelativeMemoToOpenSourceProject.includes(:relative_memos).where(osp_id: @open_source_project.id, memo_type: 'topic').count - #@relative_topics=RelativeMemo.where(id: @relative_memo_ids).group('subject').order('replies_num DESC').limit(10) - #@tech_trend_topics_ids=RelativeMemoToOpenSourceProject.where(osp_id: @open_source_project.id, memo_type: 'news').order('created_time DESC, match_weight DESC, replies_num DESC').limit(7) #.pluck(:relative_memo_id) - #@tech_trend_topics=RelativeMemo.where(id: @tech_trend_topics_ids).order('replies_num DESC') + #@relative_topics=RelativeMemo.where(id: @relative_memo_ids).group('subject').order('review_num DESC').limit(10) + #@tech_trend_topics_ids=RelativeMemoToOpenSourceProject.where(osp_id: @open_source_project.id, memo_type: 'news').order('created_time DESC, match_weight DESC, review_num DESC').limit(7) #.pluck(:relative_memo_id) + #@tech_trend_topics=RelativeMemo.where(id: @tech_trend_topics_ids).order('review_num DESC') end #用于在每个项目详情页面上显示对应职位工资信息表而定义的函数(查询数据库中的数据) diff --git a/trustie2/app/controllers/relative_memos_controller.rb b/trustie2/app/controllers/relative_memos_controller.rb index f743c0f..831ef34 100644 --- a/trustie2/app/controllers/relative_memos_controller.rb +++ b/trustie2/app/controllers/relative_memos_controller.rb @@ -180,10 +180,10 @@ class RelativeMemosController < ApplicationController boost_fields :tags => 2.0 #phrase_fields :subject => 2.0 end - if "replies_num DESC".eql?(params[:sort_field].to_s) - order_by(:replies_num, :desc) - elsif "replies_num ASC".eql?(params[:sort_field].to_s) - order_by(:replies_num, :asc) + if "review_num DESC".eql?(params[:sort_field].to_s) + order_by(:review_num, :desc) + elsif "review_num ASC".eql?(params[:sort_field].to_s) + order_by(:review_num, :asc) elsif "created_time DESC".eql?(params[:sort_field].to_s) order_by(:created_time, :desc) elsif "created_time ASC".eql?(params[:sort_field].to_s) @@ -243,7 +243,7 @@ class RelativeMemosController < ApplicationController #@tech_trend_topics=@relative_topics.order('created_time DESC').limit(7) =begin #approach 2 - @relative_topics= @open_source_project.topics.order('relative_memos.replies_num DESC, relative_memos.created_time DESC').limit(10) + @relative_topics= @open_source_project.topics.order('relative_memos.review_num DESC, relative_memos.created_time DESC').limit(10) @tech_trend_topics=@relative_topics.reorder('relative_memos.created_time DESC').first(7) =end end diff --git a/trustie2/app/models/open_source_project.rb b/trustie2/app/models/open_source_project.rb index b77eb35..66f8f36 100644 --- a/trustie2/app/models/open_source_project.rb +++ b/trustie2/app/models/open_source_project.rb @@ -50,7 +50,7 @@ class OpenSourceProject < ActiveRecord::Base integer :composite_score integer :relative_memos_num - #integer :view_num_local + #integer :view_num_ossean #time :crawled_time #time :created_time end @@ -182,7 +182,7 @@ class OpenSourceProject < ActiveRecord::Base sum+= view_num_ossean unless view_num_ossean.nil? sum+= (relative_memos_num/10) unless relative_memos_num.nil? sum - # followers_num+download_num+view_num_crawled+view_num_local+(relative_memos_num.to_i/100) + # followers_num+download_num+view_num_crawled+view_num_ossean+(relative_memos_num.to_i/100) end def applied_by?(user) diff --git a/trustie2/app/models/relative_memo.rb b/trustie2/app/models/relative_memo.rb index 6ba6896..8919a4d 100644 --- a/trustie2/app/models/relative_memo.rb +++ b/trustie2/app/models/relative_memo.rb @@ -23,7 +23,7 @@ class RelativeMemo < ActiveRecord::Base scope :news, lambda { { :conditions => ["#{RelativeMemo.table_name}.memo_type=?", 'news'], - :order => ["#{RelativeMemo.table_name}.replies_num DESC"] + :order => ["#{RelativeMemo.table_name}.review_num DESC"] } } @@ -34,7 +34,7 @@ class RelativeMemo < ActiveRecord::Base validate :cannot_reply_to_locked_topic, :on => :create #validates_uniqueness_of :osp_id, :scope => [:subject, :content] - acts_as_tree :counter_cache => :replies_num, :order => "#{RelativeMemo.table_name}.created_at ASC" + acts_as_tree :counter_cache => :review_num, :order => "#{RelativeMemo.table_name}.created_at ASC" acts_as_attachable #solr search @@ -75,7 +75,7 @@ class RelativeMemo < ActiveRecord::Base safe_attributes "author_id", "title", "content", - "replies_num", + "review_num", "view_count_crawled", "view_count_trustie", "vote_up_count", diff --git a/trustie2/app/views/open_source_projects/_os_project.html.erb b/trustie2/app/views/open_source_projects/_os_project.html.erb index 15ed093..a2e8608 100644 --- a/trustie2/app/views/open_source_projects/_os_project.html.erb +++ b/trustie2/app/views/open_source_projects/_os_project.html.erb @@ -36,7 +36,7 @@ <%= short_num (project.view_num_ossean.nil?)?0:project.view_num_ossean %> - <%#= short_num ((project.view_num_crawled.nil?)?0:project.view_num_crawled)+project.view_num_local+project.relative_topics.sum('view_num_crawled') %> + <%#= short_num ((project.view_num_crawled.nil?)?0:project.view_num_crawled)+project.view_num_ossean+project.relative_topics.sum('view_num_crawled') %> <%= content_tag('span', l(:label_view_num)) %>

diff --git a/trustie2/app/views/open_source_projects/_os_project_search_list.html.erb b/trustie2/app/views/open_source_projects/_os_project_search_list.html.erb index 1dda11d..5b0455f 100644 --- a/trustie2/app/views/open_source_projects/_os_project_search_list.html.erb +++ b/trustie2/app/views/open_source_projects/_os_project_search_list.html.erb @@ -43,14 +43,14 @@ <%= short_num((project.result.view_num_ossean.nil?)?0:project.result.view_num_ossean)%> - <%#= short_num ((project.view_num_crawled.nil?)?0:project.view_num_crawled)+project.view_num_local+project.relative_topics.sum('view_num_crawled') %> + <%#= short_num ((project.view_num_crawled.nil?)?0:project.view_num_crawled)+project.view_num_ossean+project.relative_topics.sum('view_num_crawled') %> <%= content_tag('span', l(:label_view_num)) %>

diff --git a/trustie2/app/views/open_source_projects/_show_memo.html.erb b/trustie2/app/views/open_source_projects/_show_memo.html.erb index 575f09d..923816f 100644 --- a/trustie2/app/views/open_source_projects/_show_memo.html.erb +++ b/trustie2/app/views/open_source_projects/_show_memo.html.erb @@ -23,7 +23,7 @@ - + diff --git a/trustie2/app/views/open_source_projects/_show_memos.html.erb b/trustie2/app/views/open_source_projects/_show_memos.html.erb index 4013ee8..c425774 100644 --- a/trustie2/app/views/open_source_projects/_show_memos.html.erb +++ b/trustie2/app/views/open_source_projects/_show_memos.html.erb @@ -74,7 +74,7 @@
<%= link_to (topic.replies_num), topic.url, :target => '_blank' %><%= link_to (topic.review_num), topic.url, :target => '_blank' %>
回复 - + diff --git a/trustie2/app/views/open_source_projects/_show_topics.html.erb b/trustie2/app/views/open_source_projects/_show_topics.html.erb index bd0b7f2..c0c1f23 100644 --- a/trustie2/app/views/open_source_projects/_show_topics.html.erb +++ b/trustie2/app/views/open_source_projects/_show_topics.html.erb @@ -22,7 +22,7 @@ 按  <%= link_to "时间", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC'), :method => 'get' %>   /  - <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC'), :method => 'get' %> + <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC'), :method => 'get' %>   /  <%= link_to "浏览", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'view_num_crawled DESC'), :method => 'get' %>  排序 @@ -47,7 +47,7 @@
<%= link_to (memo.replies_num), memo.url, :target => '_blank', :onclick => "return user_trace_click_knowledge_in_project_detail('#{type}','#{memo.id}','#{request.session_options[:id]}',null,'#{i+1}');" %><%= link_to (memo.review_num), memo.url, :target => '_blank', :onclick => "return user_trace_click_knowledge_in_project_detail('#{type}','#{memo.id}','#{request.session_options[:id]}',null,'#{i+1}');" %>
回帖
diff --git a/trustie2/app/views/open_source_projects/show_memos_by_type.html.erb b/trustie2/app/views/open_source_projects/show_memos_by_type.html.erb index 8e5f0f5..119d418 100644 --- a/trustie2/app/views/open_source_projects/show_memos_by_type.html.erb +++ b/trustie2/app/views/open_source_projects/show_memos_by_type.html.erb @@ -44,52 +44,52 @@ 按  - <% if "replies_num DESC".eql?(@sort_by) %> + <% if "review_num DESC".eql?(@sort_by) %> 时间   /  - 回帖 ↓ + 回帖 ↓   /  浏览 <% elsif "created_time DESC".eql?(@sort_by) %> 时间 ↓   /  - 回帖 + 回帖   /  浏览 <% elsif "view_num_crawled DESC".eql?(@sort_by) %> 时间   /  - 回帖 + 回帖   /  浏览 ↓ - <% elsif "replies_num ASC".eql?(@sort_by) %> + <% elsif "review_num ASC".eql?(@sort_by) %> 时间   /  - 回帖 ↑ + 回帖 ↑   /  浏览 <% elsif "created_time ASC".eql?(@sort_by) %> 时间 ↑   /  - 回帖 + 回帖   /  浏览 <% elsif "view_num_crawled ASC".eql?(@sort_by) %> 时间   /  - 回帖 + 回帖   /  浏览↑ <% else %> 时间   /  - 回帖 + 回帖   /  浏览 <% end %> @@ -130,7 +130,7 @@
- <%= link_to (topic.replies_num), topic.url, :target => '_blank' %> + <%= link_to (topic.review_num), topic.url, :target => '_blank' %>
- + diff --git a/trustie2/app/views/relative_memos/_show_memo.html.erb b/trustie2/app/views/relative_memos/_show_memo.html.erb index 2a57ad9..e364e9b 100644 --- a/trustie2/app/views/relative_memos/_show_memo.html.erb +++ b/trustie2/app/views/relative_memos/_show_memo.html.erb @@ -6,46 +6,46 @@ 共有<%= link_to @topics_count %>个贴子 按  - <% if "replies_num DESC".eql?(@sort_tag) %> + <% if "review_num DESC".eql?(@sort_tag) %> <%= link_to "时间", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC'), :method => 'get' %>   /  - <%= link_to "回帖 ↓", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'replies_num ASC'), :method => 'get' %> + <%= link_to "回帖 ↓", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'review_num ASC'), :method => 'get' %>   /  <%= link_to "浏览", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'view_num_crawled DESC'), :method => 'get' %> <% elsif "created_time DESC".eql?(@sort_tag) %> <%= link_to "时间 ↓", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'created_time ASC'), :method => 'get' %>   /  - <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC'), :method => 'get' %> + <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC'), :method => 'get' %>   /  <%= link_to "浏览", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'view_num_crawled DESC'), :method => 'get' %> <% elsif "view_num_crawled DESC".eql?(@sort_tag) %> <%= link_to "时间", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC'), :method => 'get' %>   /  - <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC'), :method => 'get' %> + <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC'), :method => 'get' %>   /  <%= link_to "浏览 ↓", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'view_num_crawled ASC'), :method => 'get' %> - <% elsif "replies_num ASC".eql?(@sort_tag) %> + <% elsif "review_num ASC".eql?(@sort_tag) %> <%= link_to "时间", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC'), :method => 'get' %>   /  - <%= link_to "回帖 ↑", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC'), :method => 'get' %> + <%= link_to "回帖 ↑", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC'), :method => 'get' %>   /  <%= link_to "浏览", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'view_num_crawled DESC'), :method => 'get' %> <% elsif "created_time ASC".eql?(@sort_tag) %> <%= link_to "时间 ↑", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC'), :method => 'get' %>   /  - <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC'), :method => 'get' %> + <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC'), :method => 'get' %>   /  <%= link_to "浏览", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'view_num_crawled DESC'), :method => 'get' %> <% elsif "view_num_crawled ASC".eql?(@sort_tag) %> <%= link_to "时间", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC'), :method => 'get' %>   /  - <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC'), :method => 'get' %> + <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC'), :method => 'get' %>   /  <%= link_to "浏览 ↑", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'view_num_crawled DESC'), :method => 'get' %> @@ -53,7 +53,7 @@ <% else %> <%= link_to "时间", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC'), :method => 'get' %>   /  - <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC'), :method => 'get' %> + <%= link_to "回帖", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC'), :method => 'get' %>   /  <%= link_to "浏览", open_source_project_relative_memos_path(@open_source_project, :sort_field => 'view_num_crawled DESC'), :method => 'get' %> <% end %> @@ -85,7 +85,7 @@
<%= link_to (memo.replies_num), memo.url, :target => '_blank', :onclick => "return user_trace_click_knowledge_in_project_detail_after_click_more('#{@memo_type}','#{memo.id}','nil','#{@topics_pages.page}','#{i+1}','#{@sort_by}');" %><%= link_to (memo.review_num), memo.url, :target => '_blank', :onclick => "return user_trace_click_knowledge_in_project_detail_after_click_more('#{@memo_type}','#{memo.id}','nil','#{@topics_pages.page}','#{i+1}','#{@sort_by}');" %>
回帖 - + diff --git a/trustie2/app/views/relative_memos/search.html.erb b/trustie2/app/views/relative_memos/search.html.erb index d7dbec6..26e381b 100644 --- a/trustie2/app/views/relative_memos/search.html.erb +++ b/trustie2/app/views/relative_memos/search.html.erb @@ -179,46 +179,46 @@ 搜索到 <%= @topics_count %> 个结果 按  - <% if "replies_num DESC".eql?(@sort_tag) %> + <% if "review_num DESC".eql?(@sort_tag) %> <%= link_to "时间", search_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC', :name => params[:name]), :method => 'get' %>   /  - <%= link_to "回帖 ↓", search_relative_memos_path(@open_source_project, :sort_field => 'replies_num ASC', :name => params[:name]), :method => 'get' %> + <%= link_to "回帖 ↓", search_relative_memos_path(@open_source_project, :sort_field => 'review_num ASC', :name => params[:name]), :method => 'get' %>   /  <%= link_to "关联度", search_relative_memos_path(@open_source_project, :sort_field => '', :name => params[:name]), :method => 'get' %> <% elsif "created_time DESC".eql?(@sort_tag) %> <%= link_to "时间 ↓", search_relative_memos_path(@open_source_project, :sort_field => 'created_time ASC', :name => params[:name]), :method => 'get' %>   /  - <%= link_to "回帖", search_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC', :name => params[:name]), :method => 'get' %> + <%= link_to "回帖", search_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC', :name => params[:name]), :method => 'get' %>   /  <%= link_to "关联度", search_relative_memos_path(@open_source_project, :sort_field => '', :name => params[:name]), :method => 'get' %> <% elsif "".eql?(@sort_tag) %> <%= link_to "时间", search_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC', :name => params[:name]), :method => 'get' %>   /  - <%= link_to "回帖", search_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC', :name => params[:name]), :method => 'get' %> + <%= link_to "回帖", search_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC', :name => params[:name]), :method => 'get' %>   /  <%= link_to "关联度", search_relative_memos_path(@open_source_project, :sort_field => '', :name => params[:name]), :method => 'get' %> - <% elsif "replies_num ASC".eql?(@sort_tag) %> + <% elsif "review_num ASC".eql?(@sort_tag) %> <%= link_to "时间", search_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC', :name => params[:name]), :method => 'get' %>   /  - <%= link_to "回帖 ↑", search_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC', :name => params[:name]), :method => 'get' %> + <%= link_to "回帖 ↑", search_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC', :name => params[:name]), :method => 'get' %>   /  <%= link_to "关联度", search_relative_memos_path(@open_source_project, :sort_field => '', :name => params[:name]), :method => 'get' %> <% elsif "created_time ASC".eql?(@sort_tag) %> <%= link_to "时间 ↑", search_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC', :name => params[:name]), :method => 'get' %>   /  - <%= link_to "回帖", search_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC', :name => params[:name]), :method => 'get' %> + <%= link_to "回帖", search_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC', :name => params[:name]), :method => 'get' %>   /  <%= link_to "关联度", search_relative_memos_path(@open_source_project, :sort_field => '', :name => params[:name]), :method => 'get' %> <% else %> <%= link_to "时间", search_relative_memos_path(@open_source_project, :sort_field => 'created_time DESC', :name => params[:name]), :method => 'get' %>   /  - <%= link_to "回帖", search_relative_memos_path(@open_source_project, :sort_field => 'replies_num DESC', :name => params[:name]), :method => 'get' %> + <%= link_to "回帖", search_relative_memos_path(@open_source_project, :sort_field => 'review_num DESC', :name => params[:name]), :method => 'get' %>   /  <%= link_to "关联度", search_relative_memos_path(@open_source_project, :sort_field => '', :name => params[:name]), :method => 'get' %> <% end %> @@ -250,9 +250,9 @@

- <%= topic.replies_num %> + <%= topic.review_num %> - <%= content_tag('span', l(:label_replies_num)) %> + <%= content_tag('span', l(:label_review_num)) %>

diff --git a/trustie2/app/views/tags/_show_topics.html.erb b/trustie2/app/views/tags/_show_topics.html.erb index 6d6fbff..6be0043 100644 --- a/trustie2/app/views/tags/_show_topics.html.erb +++ b/trustie2/app/views/tags/_show_topics.html.erb @@ -32,9 +32,9 @@

- <%= topic.replies_num %> + <%= topic.review_num %> - <%= content_tag('span', l(:label_replies_num), :class => 'info-desc' ) %> + <%= content_tag('span', l(:label_review_num), :class => 'info-desc' ) %>

diff --git a/trustie2/config/locales/zh.yml b/trustie2/config/locales/zh.yml index 754a5d8..1c53e4a 100644 --- a/trustie2/config/locales/zh.yml +++ b/trustie2/config/locales/zh.yml @@ -1985,7 +1985,7 @@ zh: ####################### ############帖子 - label_replies_num: 个回复 + label_review_num: 个回复 label_view_num: 次浏览 label_collection_num: 次收藏 ############帖子 diff --git a/trustie2/db/migrate/20140827064358_changes_to_relative_memos.rb b/trustie2/db/migrate/20140827064358_changes_to_relative_memos.rb index fef1b34..22dde19 100644 --- a/trustie2/db/migrate/20140827064358_changes_to_relative_memos.rb +++ b/trustie2/db/migrate/20140827064358_changes_to_relative_memos.rb @@ -1,6 +1,6 @@ class ChangesToRelativeMemos < ActiveRecord::Migration def change - rename_column :relative_memos, :replies_count, :replies_num + rename_column :relative_memos, :replies_count, :review_num rename_column :relative_memos, :view_count_crawled, :view_num_crawled rename_column :relative_memos, :vote_up_count, :vote_up_num rename_column :relative_memos, :collection_count, :collection_num diff --git a/trustie2/db/migrate/20141008075630_add_created_at_and_replies_num_to_relative_memo_to_osp.rb b/trustie2/db/migrate/20141008075630_add_created_at_and_replies_num_to_relative_memo_to_osp.rb index acbf294..bafad2a 100644 --- a/trustie2/db/migrate/20141008075630_add_created_at_and_replies_num_to_relative_memo_to_osp.rb +++ b/trustie2/db/migrate/20141008075630_add_created_at_and_replies_num_to_relative_memo_to_osp.rb @@ -1,6 +1,6 @@ class AddCreatedAtAndRepliesNumToRelativeMemoToOsp < ActiveRecord::Migration def change add_column :relative_memo_to_open_source_projects, :created_at, :datetime - add_column :relative_memo_to_open_source_projects, :replies_num, :integer + add_column :relative_memo_to_open_source_projects, :review_num, :integer end end diff --git a/trustie2/db/migrate/20141008075942_add_created_at_and_replies_num_index_to_relative_memo_to_osp.rb b/trustie2/db/migrate/20141008075942_add_created_at_and_replies_num_index_to_relative_memo_to_osp.rb index 00e6e44..9084ad4 100644 --- a/trustie2/db/migrate/20141008075942_add_created_at_and_replies_num_index_to_relative_memo_to_osp.rb +++ b/trustie2/db/migrate/20141008075942_add_created_at_and_replies_num_index_to_relative_memo_to_osp.rb @@ -1,6 +1,6 @@ class AddCreatedAtAndRepliesNumIndexToRelativeMemoToOsp < ActiveRecord::Migration def change add_index :relative_memo_to_open_source_projects, [:osp_id, :created_at], :name => 'relative_memo_to_osp_osp_id_created' - add_index :relative_memo_to_open_source_projects, [:osp_id, :replies_num], :name => 'relative_memo_to_osp_osp_id_replies_num' + add_index :relative_memo_to_open_source_projects, [:osp_id, :review_num], :name => 'relative_memo_to_osp_osp_id_review_num' end end diff --git a/trustie2/db/migrate/20141012163038_synchronize_relative_memo_to_osp_to_relative_memo.rb b/trustie2/db/migrate/20141012163038_synchronize_relative_memo_to_osp_to_relative_memo.rb index 267c8e6..a389002 100644 --- a/trustie2/db/migrate/20141012163038_synchronize_relative_memo_to_osp_to_relative_memo.rb +++ b/trustie2/db/migrate/20141012163038_synchronize_relative_memo_to_osp_to_relative_memo.rb @@ -6,7 +6,7 @@ BEGIN DECLARE memo_id INT; #DECLARE tmp value DECLARE tmp_created_time datetime; - DECLARE tmp_replies_num INT; + DECLARE tmp_review_num INT; DECLARE tmp_updated_time datetime; DECLARE tmp_view_num_crawled INT; DECLARE tmp_vote_up_num INT; @@ -26,10 +26,10 @@ BEGIN REPEAT FETCH cur_relative_memo INTO memo_id; #query the specified memo - SELECT created_time, replies_num, updated_time, view_num_crawled, vote_up_num, collection_num, memo_type, category, view_num_ossean, COUNT(*) INTO tmp_created_time, tmp_replies_num, tmp_updated_time, tmp_view_num_crawled, tmp_vote_up_num,tmp_collection_num, tmp_memo_type, tmp_category, tmp_view_num_ossean, num FROM relative_memos WHERE id = memo_id; + SELECT created_time, review_num, updated_time, view_num_crawled, vote_up_num, collection_num, memo_type, category, view_num_ossean, COUNT(*) INTO tmp_created_time, tmp_review_num, tmp_updated_time, tmp_view_num_crawled, tmp_vote_up_num,tmp_collection_num, tmp_memo_type, tmp_category, tmp_view_num_ossean, num FROM relative_memos WHERE id = memo_id; #update all the records WHERE relative_meom_id = meom_id IF num > 0 THEN - UPDATE relative_memo_to_open_source_projects SET created_time = tmp_created_time, replies_num = tmp_replies_num, updated_time = tmp_updated_time, view_num_crawled = tmp_view_num_crawled, vote_up_num = tmp_vote_up_num, collection_num = tmp_collection_num, memo_type = tmp_memo_type, category = tmp_category, view_num_ossean = tmp_view_num_ossean, has_synchronized = 1 WHERE relative_memo_id = memo_id; + UPDATE relative_memo_to_open_source_projects SET created_time = tmp_created_time, review_num = tmp_review_num, updated_time = tmp_updated_time, view_num_crawled = tmp_view_num_crawled, vote_up_num = tmp_vote_up_num, collection_num = tmp_collection_num, memo_type = tmp_memo_type, category = tmp_category, view_num_ossean = tmp_view_num_ossean, has_synchronized = 1 WHERE relative_memo_id = memo_id; END IF; UNTIL 0 END REPEAT; diff --git a/trustie2/db/migrate/20141117134250_add_info_to_osp.rb b/trustie2/db/migrate/20141117134250_add_info_to_osp.rb index b9f388f..45c2ecc 100644 --- a/trustie2/db/migrate/20141117134250_add_info_to_osp.rb +++ b/trustie2/db/migrate/20141117134250_add_info_to_osp.rb @@ -9,7 +9,7 @@ class AddInfoToOsp < ActiveRecord::Migration add_column :open_source_projects, :category, :string add_column :open_source_projects, :crawled_time, :datetime add_column :open_source_projects, :source, :string - add_column :open_source_projects, :view_num_local, :integer, :default => 0 + add_column :open_source_projects, :view_num_ossean, :integer, :default => 0 add_column :open_source_projects, :created_at, :datetime add_column :open_source_projects, :updated_at, :datetime add_column :open_source_projects, :ossean_score, :decimal, :default => 0 diff --git a/trustie2/db/migrate/20150713121254_add_match_result_part_table.rb b/trustie2/db/migrate/20150713121254_add_match_result_part_table.rb index a0cfa22..98efdc1 100644 --- a/trustie2/db/migrate/20150713121254_add_match_result_part_table.rb +++ b/trustie2/db/migrate/20150713121254_add_match_result_part_table.rb @@ -4,7 +4,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -17,7 +17,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -30,7 +30,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -43,7 +43,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -57,7 +57,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -71,7 +71,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -85,7 +85,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -99,7 +99,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -113,7 +113,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -127,7 +127,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -141,7 +141,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -155,7 +155,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -169,7 +169,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -183,7 +183,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -197,7 +197,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -211,7 +211,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -225,7 +225,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -239,7 +239,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -253,7 +253,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -267,7 +267,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -281,7 +281,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -295,7 +295,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -309,7 +309,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -323,7 +323,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -337,7 +337,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -351,7 +351,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -365,7 +365,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -379,7 +379,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -393,7 +393,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -407,7 +407,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -421,7 +421,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -435,7 +435,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -449,7 +449,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -463,7 +463,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -477,7 +477,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -491,7 +491,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -505,7 +505,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -519,7 +519,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -533,7 +533,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -547,7 +547,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -561,7 +561,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -575,7 +575,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -589,7 +589,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -603,7 +603,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -617,7 +617,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -631,7 +631,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -645,7 +645,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -659,7 +659,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -673,7 +673,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -687,7 +687,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -701,7 +701,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -715,7 +715,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -729,7 +729,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -743,7 +743,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -757,7 +757,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -771,7 +771,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -785,7 +785,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -799,7 +799,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -813,7 +813,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -827,7 +827,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -841,7 +841,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -855,7 +855,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -869,7 +869,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -883,7 +883,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -897,7 +897,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -911,7 +911,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -925,7 +925,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -939,7 +939,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -953,7 +953,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean @@ -967,7 +967,7 @@ class AddMatchResultPartTable < ActiveRecord::Migration t.integer :osp_id, :null => false t.integer :relative_memo_id, :null => false t.float :match_weight, :default => 0 - t.integer :replies_num + t.integer :review_num t.integer :view_num_crawled t.string :memo_type t.integer :view_num_ossean diff --git a/trustie2/db/ossean_production.sql b/trustie2/db/ossean_production.sql index 8999981..528223e 100644 --- a/trustie2/db/ossean_production.sql +++ b/trustie2/db/ossean_production.sql @@ -1336,7 +1336,7 @@ CREATE TABLE `relative_memo_to_open_source_projects` ( `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', `created_time` datetime DEFAULT NULL, - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `updated_time` datetime DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `vote_up_num` int(11) DEFAULT NULL, @@ -1352,7 +1352,7 @@ CREATE TABLE `relative_memo_to_open_source_projects` ( KEY `find_by_osp_id` (`osp_id`) USING BTREE, KEY `osp_id_weight_query` (`osp_id`,`match_weight`) USING BTREE, KEY `relative_memo_to_osp_osp_id_created` (`osp_id`,`created_time`) USING BTREE, - KEY `relative_memo_to_osp_osp_id_replies_num` (`osp_id`,`replies_num`) USING BTREE, + KEY `relative_memo_to_osp_osp_id_review_num` (`osp_id`,`review_num`) USING BTREE, KEY `check_if_synchronized` (`has_synchronized`) USING BTREE, KEY `index_relative_memo_to_open_source_projects_on_relative_memo_id` (`relative_memo_id`) USING BTREE, KEY `relative_memo_to_osp_osp_id_view_num_crawled` (`osp_id`,`view_num_crawled`) USING BTREE @@ -1367,7 +1367,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_1` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1389,7 +1389,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_10` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1411,7 +1411,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_11` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1433,7 +1433,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_12` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1455,7 +1455,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_13` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1477,7 +1477,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_14` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1499,7 +1499,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_15` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1521,7 +1521,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_16` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1543,7 +1543,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_17` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1565,7 +1565,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_18` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1587,7 +1587,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_19` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1609,7 +1609,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_2` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1631,7 +1631,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_20` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1653,7 +1653,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_21` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1675,7 +1675,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_22` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1697,7 +1697,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_23` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1719,7 +1719,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_24` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1741,7 +1741,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_25` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1763,7 +1763,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_26` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1785,7 +1785,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_27` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1807,7 +1807,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_28` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1829,7 +1829,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_29` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1851,7 +1851,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_3` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1873,7 +1873,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_30` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1895,7 +1895,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_31` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1917,7 +1917,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_32` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1939,7 +1939,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_33` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1961,7 +1961,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_34` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -1983,7 +1983,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_35` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2005,7 +2005,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_36` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2027,7 +2027,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_37` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2049,7 +2049,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_38` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2071,7 +2071,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_39` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2093,7 +2093,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_4` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2115,7 +2115,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_40` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2137,7 +2137,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_41` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2159,7 +2159,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_42` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2181,7 +2181,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_43` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2203,7 +2203,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_44` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2225,7 +2225,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_45` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2247,7 +2247,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_46` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2269,7 +2269,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_47` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2291,7 +2291,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_48` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2313,7 +2313,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_49` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2335,7 +2335,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_5` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2357,7 +2357,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_50` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2379,7 +2379,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_51` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2401,7 +2401,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_52` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2423,7 +2423,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_53` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2445,7 +2445,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_54` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2467,7 +2467,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_55` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2489,7 +2489,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_56` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2511,7 +2511,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_57` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2533,7 +2533,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_58` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2555,7 +2555,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_59` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2577,7 +2577,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_6` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2599,7 +2599,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_60` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2621,7 +2621,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_61` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2643,7 +2643,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_62` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2665,7 +2665,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_63` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2687,7 +2687,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_64` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2709,7 +2709,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_65` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2731,7 +2731,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_66` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2753,7 +2753,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_67` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2775,7 +2775,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_68` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2797,7 +2797,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_69` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2819,7 +2819,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_7` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2841,7 +2841,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_70` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2863,7 +2863,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_8` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -2885,7 +2885,7 @@ CREATE TABLE `relative_memo_to_open_source_projects_9` ( `osp_id` int(11) NOT NULL, `relative_memo_id` int(11) NOT NULL, `match_weight` float DEFAULT '0', - `replies_num` int(11) DEFAULT NULL, + `review_num` int(11) DEFAULT NULL, `view_num_crawled` int(11) DEFAULT NULL, `memo_type` varchar(255) DEFAULT NULL, `view_num_ossean` int(11) DEFAULT NULL, @@ -3499,4 +3499,4 @@ CREATE ALGORITHM=UNDEFINED DEFINER=`trustie`@`%` SQL SECURITY DEFINER VIEW `mat -- View structure for stackoverflow_sql_view -- ---------------------------- DROP VIEW IF EXISTS `stackoverflow_sql_view`; -CREATE ALGORITHM=UNDEFINED DEFINER=`trustie`@`%` SQL SECURITY DEFINER VIEW `stackoverflow_sql_view` AS select `relative_memos`.`id` AS `id`,`relative_memos`.`osp_id` AS `osp_id`,`relative_memos`.`subject` AS `subject`,`relative_memos`.`content` AS `content`,`relative_memos`.`author` AS `author`,`relative_memos`.`replies_num` AS `replies_num`,`relative_memos`.`lock` AS `lock`,`relative_memos`.`sticky` AS `sticky`,`relative_memos`.`created_at` AS `created_at`,`relative_memos`.`updated_at` AS `updated_at`,`relative_memos`.`url` AS `url`,`relative_memos`.`view_num_crawled` AS `view_num_crawled`,`relative_memos`.`vote_up_num` AS `vote_up_num`,`relative_memos`.`collection_num` AS `collection_num`,`relative_memos`.`abstract` AS `abstract`,`relative_memos`.`memo_type` AS `memo_type`,`relative_memos`.`source` AS `source`,`relative_memos`.`category` AS `category`,`relative_memos`.`view_num_ossean` AS `view_num_ossean`,`relative_memos`.`author_id` AS `author_id`,`relative_memos`.`last_reply_id` AS `last_reply_id`,`relative_memos`.`is_quote` AS `is_quote`,`relative_memos`.`username` AS `username`,`relative_memos`.`userhomeurl` AS `userhomeurl`,`relative_memos`.`parent_id` AS `parent_id`,`relative_memos`.`crawled_time` AS `crawled_time`,`relative_memos`.`created_time` AS `created_time`,`relative_memos`.`updated_time` AS `updated_time`,`relative_memos`.`url_md5` AS `url_md5`,`relative_memos`.`author_url` AS `author_url`,`relative_memos`.`tags` AS `tags` from `relative_memos` where (`relative_memos`.`source` = 'StackOverflow') ; +CREATE ALGORITHM=UNDEFINED DEFINER=`trustie`@`%` SQL SECURITY DEFINER VIEW `stackoverflow_sql_view` AS select `relative_memos`.`id` AS `id`,`relative_memos`.`osp_id` AS `osp_id`,`relative_memos`.`subject` AS `subject`,`relative_memos`.`content` AS `content`,`relative_memos`.`author` AS `author`,`relative_memos`.`review_num` AS `review_num`,`relative_memos`.`lock` AS `lock`,`relative_memos`.`sticky` AS `sticky`,`relative_memos`.`created_at` AS `created_at`,`relative_memos`.`updated_at` AS `updated_at`,`relative_memos`.`url` AS `url`,`relative_memos`.`view_num_crawled` AS `view_num_crawled`,`relative_memos`.`vote_up_num` AS `vote_up_num`,`relative_memos`.`collection_num` AS `collection_num`,`relative_memos`.`abstract` AS `abstract`,`relative_memos`.`memo_type` AS `memo_type`,`relative_memos`.`source` AS `source`,`relative_memos`.`category` AS `category`,`relative_memos`.`view_num_ossean` AS `view_num_ossean`,`relative_memos`.`author_id` AS `author_id`,`relative_memos`.`last_reply_id` AS `last_reply_id`,`relative_memos`.`is_quote` AS `is_quote`,`relative_memos`.`username` AS `username`,`relative_memos`.`userhomeurl` AS `userhomeurl`,`relative_memos`.`parent_id` AS `parent_id`,`relative_memos`.`crawled_time` AS `crawled_time`,`relative_memos`.`created_time` AS `created_time`,`relative_memos`.`updated_time` AS `updated_time`,`relative_memos`.`url_md5` AS `url_md5`,`relative_memos`.`author_url` AS `author_url`,`relative_memos`.`tags` AS `tags` from `relative_memos` where (`relative_memos`.`source` = 'StackOverflow') ; diff --git a/trustie2/solr/conf/solrconfig.xml b/trustie2/solr/conf/solrconfig.xml index 4d3419f..d093eb0 100644 --- a/trustie2/solr/conf/solrconfig.xml +++ b/trustie2/solr/conf/solrconfig.xml @@ -429,7 +429,7 @@ this file, see http://wiki.apache.org/solr/SolrConfigXml.

<%= link_to (topic.replies_num), topic.url, :target => '_blank' %><%= link_to (topic.review_num), topic.url, :target => '_blank' %>
回帖