2012-10-09 1 views
0

내 레일 프로젝트에서 스핑크스 검색을 사용하고 있습니다. 나는 sphinx.yml 파일을 가지고있다.스핑크스 검색 max_matches가 sphinx.yml 파일을 사용하지 않음

defaults: &defaults 

    enable_wildcard: 1 

    min_prefix_len: 2 

    enable_star: 1 

    max_matches: 25000 

    development: 

    <<: *defaults 

    test: 

    <<: *defaults 

    production: 

    <<: *defaults 

    pid_file: "RAILS_ROOT/log/searchd.pid" 

    searchd_file_path: "RAILS_ROOT/config/db/sphinx" 

    indexer_binary_name: "/usr/local/bin/indexer" 

    searchd_binary_name: "/usr/local/bin/searchd" 

    port: 9314 

내 컨트롤러의 동작에는 다음과 같은 코드가 있습니다.

Application.search(query,:with => options,:order => "updated_at DESC",:max_matches=> 25_000, 
                    :match_mode => :extended).page(params[:page]).per(11) 

이렇게 잘못되었습니다.

 searchd error (status: 1): per-query max_matches=25000 out of bounds (per-server max_matches=1000) 

좋은 제안 ?? 부디.

+0

변경 이후 색인을 다시 작성 했습니까? – MrTheWalrus

+0

예, 재건되었지만 작동하지 않았습니다. –

+0

Odd. 이 시도하고 그것을 (비록 내가 postgres보다는 mysql 사용하고있다) 일했다. 올바른 값이 sphinx.conf 파일에 나타 납니까? (검색을위한 블록에서'max_matches = 25000') – MrTheWalrus

답변

2

sphinx.conf에서 max_matches를 늘리고 searchd 프로세스를 다시 시작해야합니다. max_matches는 검색 설정이며 인덱싱 프로세스와 아무 관련이 없습니다.

관련 문제