First version of Solr search.

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-08-08 10:59:55 +08:00
1 parent ef96ec841a
commit 1cdc0e24bd
19 files changed
+1738 -62

No files matched your search

+15 -2
View File
@@ -6,9 +6,22 @@ namespace :matt_dev do
p a
a= Redis::Search.query("NewsBulletin",'社科院',:conditions =>{:is_checked=>true,:is_hidden=>false})
p a
# p Pinyin.t('台灣不是中國的一部分')
end
task :searching_02 => :environment do
a= Bulletin.solr_search do #("Bulletin",'我',:conditions =>{:is_checked=>true,:is_hidden=>false})
fulltext '我'
with(:frontend_search,true)
#with(:is_hidden,true)
end
p a.results
a= NewsBulletin.solr_search do #("NewsBulletin",'社科院',:conditions =>{:is_checked=>true,:is_hidden=>false})
fulltext '社科院'
with(:frontend_search,true)
#with(:is_hidden,true)
end
p a.results
end
task :testing_new_tag_cal do
ranges = [[1],[1,2],[1,2,3],[1,2,3,4],[1,2,3,4,5],[1,2,3,4,5,6],[1,2,3,4,5,6,7],[1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7,8,9,10],[1,2,3,4,5,6,7,8,9,10,11],[1,2,3,4,5,6,7,8,9,10,11,12],[-1,-2,-3,-4,5,6,7,8,9,10,11,12]]