다음 예제를 기본으로 사용하면 ... 올바르게 설정되지 않은 경우 수정하십시오. 마이그레이션 파일 : class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :first_name, null: false
t.str
풍부한 문서의 색인을 생성하려고하지만 몇 가지 문제가 있습니다. http://cbpowell.wordpress.com/2012/09/18/indexing-rich-documents-with-rails-sunspot-solr-sunspot-cell-and-carrierwave-cookbook-style/ $rake sunspot:reindex
rake a
레일즈 앱에서 보석을 사용합니다. 내가 가지고있는 것 : order_by(:some_time, :desc). 내가 뭘해야입니다 : :some time 열 값은 지난 한 시간 내에 경우이 조건으로 모든 레코드, 그렇지 않으면 내가 워드 프로세서와 I 유사한 아무것도 찾을 수 없습니다 :some_time 에 의해 주문 :status 열을 기준으로 정렬 이것을
내가하고 싶은 무엇 이 class Principal < ApplicationRecord
searchable do
text :name
end
end
내가 만들거나이를 저장할 때 다음, 내가 원하는과 같은 모델을 가지고있다 sunspot을 통해 solr에서 나오는 타입은 'HeadmasterPrincipal'과 같이 다른 것입니
내가 SOLR으로 인덱스를 다시 할 때마다 양의 정수 여야합니다, 나는 $ RAILS_ENV=development rake sunspot:solr:reindex
Error using progress bar: Max must be a positive integer
가 어떻게이 문제를 해결 할 다음과 같은 오류가?
검색을 위해 solr을 사용하고 있습니다. searchable do text :name end 그리고 컨트롤러 클라이언트 : 콘솔에서 def index
@search = Client.search do
fulltext params[:search]
end
@clients = @search.results
end
: 내 모
새 프로젝트의 첨부 파일 내에서 전체 텍스트 검색을 구현하려고합니다. 첨부 파일은 PDF, EPUB, DOC 개의 파일을 포함합니다. 나는 this 튜토리얼을 따라 gem sunspot_solr 및 gem sunspot_cell 이것을 구현했습니다. 그러나 나는 gem이 4 살이며 활발하지 않아 많은 문제에 직면하고 있습니다. 다른 gem 또는 문서에서 전
난 내 레일 응용 프로그램에서 전체 텍스트 검색을 구현하려고합니다. 신청서는 comfortable_mexican_sofa을 기준으로합니다. 전체 텍스트를 보려면 sunspot gem을 사용하고 있습니다. Pages 클래스에 검색 가능한 특성을 추가해야합니다. 같은 클래스의 모델에서 새 파일을 만들었지 만 작동하지 않는 것 같습니다. 이 수업을 어떻게 확장
> Entity.where(:price => 40000).count
1
> e = Entity.search do
> with(:price, 0..40001)
> end
> e.results.count
0
모델 entity.rb : class Entity < ActiveRecord::Base
searchable do
int
나는 sunspot gem 및 apache solr의 전체 텍스트 검색을 추가했습니다. 내 프로젝트에 많은 새 파일이 있습니다. 나는 그것이 맞다, 모르겠지만,이 파일 최선을 다하고 : solr/configsets/sunspot/conf/_rest_managed.json
solr/configsets/sunspot/conf/admin-extra.html