Compare commits

...

2 Commits
wt ... master

Author SHA1 Message Date
starlee a754c75d89 gather_program/sql/open_source_projects.sql.tar.gz 2016-11-22 21:20:10 +08:00
zhanyun 4910ac726e trustie2 solr config 2016-11-22 12:18:45 +08:00
3 changed files with 14 additions and 14 deletions

Binary file not shown.

View File

@ -38,19 +38,19 @@ class RelativeMemo < ActiveRecord::Base
acts_as_attachable
#solr search
searchable do
text :title, :stored => false
integer :review_num
#integer :parent_id
time :created_time
text :tags
string :source, :stored => false
#integer :view_num
#integer :view_num_ossean
#integer :collection_num
#join(:osp_id, :target => RelativeMemoToOpenSourceProject, :type => :integer, :join => { :from => :relative_memo_id, :to => :id }, :as => 'osp_id')
#join(:relative_memo_id, :target => RelativeMemoToOpenSourceProject, :type => :integer, :join => { :from => :relative_memo_id, :to => :id }, :as => 'relative_memo_id')
end
# searchable do
# text :title, :stored => false
# integer :review_num
# #integer :parent_id
# time :created_time
# text :tags
# string :source, :stored => false
# #integer :view_num
# #integer :view_num_ossean
# #integer :collection_num
# #join(:osp_id, :target => RelativeMemoToOpenSourceProject, :type => :integer, :join => { :from => :relative_memo_id, :to => :id }, :as => 'osp_id')
# #join(:relative_memo_id, :target => RelativeMemoToOpenSourceProject, :type => :integer, :join => { :from => :relative_memo_id, :to => :id }, :as => 'relative_memo_id')
# end
belongs_to :last_reply, :class_name => 'RelativeMemo', :foreign_key => 'last_reply_id'
# acts_as_searchable :column => ['title', 'content'],

View File

@ -347,7 +347,7 @@ that avoids logging every request
<!-- field for the QueryParser to use when an explicit fieldname is absent -->
<defaultSearchField>text</defaultSearchField>
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
<solrQueryParser defaultOperator="AND"/>
<solrQueryParser defaultOperator="OR"/>
<!-- copyField commands copy one field to another at the time a document
is added to the index. It's used either to index the same field differently,
or to add multiple fields to the same field for easier/faster searching. -->