Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
cs_comments_service
Commits
280ce78e
Commit
280ce78e
authored
Apr 15, 2014
by
jsa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade tire to 0.5.2, update use of deprecated "text" search api
parent
590e458a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
Gemfile
+1
-1
Gemfile.lock
+6
-6
models/comment_thread.rb
+2
-2
No files found.
Gemfile
View file @
280ce78e
...
...
@@ -35,7 +35,7 @@ gem 'will_paginate_mongoid'
gem
'
rdiscount
'
gem
'
nokogiri
'
gem
'
tire
'
gem
'
tire
'
,
"0.5.2"
gem
'
tire-contrib
'
gem
'
dalli
'
...
...
Gemfile.lock
View file @
280ce78e
...
...
@@ -83,14 +83,14 @@ GEM
thor (>= 0.14.6)
guard-unicorn (0.0.7)
guard (>= 1.1)
hashr (0.0.2
1
)
hashr (0.0.2
2
)
hike (1.2.1)
i18n (0.6.9)
journey (1.0.4)
kgio (2.7.4)
listen (0.5.0)
method_source (0.8)
mime-types (
1.19
)
mime-types (
2.2
)
mongo (1.6.4)
bson (~> 1.6.4)
mongoid (3.0.15)
...
...
@@ -99,7 +99,7 @@ GEM
origin (~> 1.0)
tzinfo (~> 0.3.22)
moped (1.5.1)
multi_json (1.
8
.2)
multi_json (1.
9
.2)
newrelic_moped (0.0.6)
moped
newrelic_rpm (~> 3.6.0)
...
...
@@ -121,7 +121,7 @@ GEM
rack (>= 1.0)
rack-timeout (0.1.0beta3)
raindrops (0.10.0)
rake (
0.9
.2.2)
rake (
10
.2.2)
rdiscount (1.6.8)
rest-client (1.6.7)
mime-types (>= 1.16)
...
...
@@ -148,7 +148,7 @@ GEM
tilt (~> 1.1, != 1.3.0)
thor (0.16.0)
tilt (1.3.3)
tire (0.
4
.2)
tire (0.
5
.2)
activemodel (>= 3.0)
hashr (~> 0.0.19)
multi_json (~> 1.0)
...
...
@@ -202,7 +202,7 @@ DEPENDENCIES
rspec
simplecov
sinatra
tire
tire
(= 0.5.2)
tire-contrib
unicorn
voteable_mongo!
...
...
models/comment_thread.rb
View file @
280ce78e
...
...
@@ -98,7 +98,7 @@ class CommentThread < Content
search
=
Tire
::
Search
::
Search
.
new
'comment_threads'
search
.
query
{
|
query
|
query
.
text
:_all
,
params
[
"text"
]}
if
params
[
"text"
]
search
.
query
{
|
query
|
query
.
match
:_all
,
params
[
"text"
]}
if
params
[
"text"
]
search
.
highlight
({
title:
{
number_of_fragments:
0
}
}
,
{
body:
{
number_of_fragments:
0
}
},
options:
{
tag:
"<highlight>"
})
search
.
filter
(
:term
,
commentable_id:
params
[
"commentable_id"
])
if
params
[
"commentable_id"
]
search
.
filter
(
:terms
,
commentable_id:
params
[
"commentable_ids"
])
if
params
[
"commentable_ids"
]
...
...
@@ -126,7 +126,7 @@ class CommentThread < Content
if
params
[
"text"
]
search
=
Tire
::
Search
::
Search
.
new
'comments'
search
.
query
{
|
query
|
query
.
text
:_all
,
params
[
"text"
]}
if
params
[
"text"
]
search
.
query
{
|
query
|
query
.
match
:_all
,
params
[
"text"
]}
if
params
[
"text"
]
search
.
filter
(
:term
,
course_id:
params
[
"course_id"
])
if
params
[
"course_id"
]
search
.
size
CommentService
.
config
[
"max_deep_search_comment_count"
].
to_i
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment