Commit 77f70a75 by nnnghia98

change q params for response

parent fed36eef
...@@ -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
......
...@@ -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
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment