
henka at cityweb
Mar 15, 2007, 5:20 AM
Views: 685
Permalink
|
|
KinoSearch::Search::SortSpec search process runaway
|
|
Hello, I'm experimenting with the latest development version (from svn), and there seems to be an issue with sorting - indexing runs OK, but searching results in the search.cgi process chewing up 100% cpu cycles (strace shows the process seemingly stuck in a loop: ... open("...test/uscon_invindex", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3 fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 getdents64(3, /* 4 entries */, 4096) = 120 getdents64(3, /* 0 entries */, 4096) = 0 close(3) ...) I modified the UScon app as follows: USConSchema.pm: package USConSchema::IndexedUnAnalyzedField; use base 'KinoSearch::Schema::FieldSpec'; sub indexed {1} sub analyzed {0} Added extra field to %FIELDS: url2 => 'USConSchema::IndexedUnAnalyzedField', invindexer.plx: $doc{url2} = $url; search.cgi: use KinoSearch::Search::SortSpec; my $sort_spec = KinoSearch::Search::SortSpec->new; $sort_spec->add( field => 'url2' ); ... my $hits = $searcher->search( query => $q, offset => $offset, num_wanted => $hits_per_page, sort_spec => $sort_spec ); Cheers Henry
|