Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VeNJOB
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyen Ngoc Nghia
VeNJOB
Commits
77f70a75
Commit
77f70a75
authored
Feb 14, 2020
by
nnnghia98
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change q params for response
parent
fed36eef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/controllers/jobs_controller.rb
+1
-1
app/services/solr_service.rb
+1
-1
No files found.
app/controllers/jobs_controller.rb
View file @
77f70a75
...
@@ -3,7 +3,7 @@ class JobsController < ApplicationController
...
@@ -3,7 +3,7 @@ class JobsController < ApplicationController
before_action
:find_user
,
only: :apply_available
before_action
:find_user
,
only: :apply_available
def
index
def
index
@search
=
params
[
:search
]
||
"
*:*
"
@search
=
params
[
:search
]
||
"
:
"
if
params
[
:city_id
]
if
params
[
:city_id
]
@city
=
City
.
find
(
params
[
:city_id
])
@city
=
City
.
find
(
params
[
:city_id
])
@jobs
=
@city
.
jobs
@jobs
=
@city
.
jobs
...
...
app/services/solr_service.rb
View file @
77f70a75
...
@@ -37,7 +37,7 @@ class SolrService
...
@@ -37,7 +37,7 @@ class SolrService
# city = @city.present? ? "city:\"#{escape_str(@city.name)}\"" : ""
# city = @city.present? ? "city:\"#{escape_str(@city.name)}\"" : ""
# industry = @industry.present? ? "industry:\"#{escape_str(@industry.name)}\"" : ""
# industry = @industry.present? ? "industry:\"#{escape_str(@industry.name)}\"" : ""
response
=
@solr
.
get
"select"
,
params:
{
response
=
@solr
.
get
"select"
,
params:
{
q:
"
#{
params
}
"
,
q:
"
*
#{
params
}
*
"
,
# fq: [industry, city],
# fq: [industry, city],
rows:
Job
.
count
rows:
Job
.
count
}
}
...
...
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