page
and per_page
use library rsolr-ext
in order to connect to Apache Solr.And i get an error same as:
NoMethodError: undefined method `to_i' for ["10", "10"]:Array
from /home/khanhpn/.rvm/gems/ruby-2.2.2@music/gems/rsolr-ext-1.0.3/lib/rsolr-ext/response.rb:27:in `rows'
This is my code:
@solr_connection = RSolr::Ext.connect(
url: "http://localhost:8080/solr/music",
open_timeout: 10,
read_timeout: 10,
retry_503: 2)
solr_params = {
:page => 0,
:per_page => 10,
:field_names => [:id, :title],
:queries => "xuan"
}
solr_connection.find(solr_params)
Hope that everybody can support me. Thank you very much.
答案 0 :(得分:0)
我猜问题是使用:field_names
密钥,RSolr::Ext#find
方法似乎不支持该密钥。您是否误解了:queries
,:phrases
或其他可用的内容?