Hi,
It's my 2nd day looking into KinoSearch, so I'm sorry if I'm missing
something obvious, but the behavior I'm seeing is certainly weird.
For debugging purposes, I've minimized the index to just one field
('title'), and I'm doing a series of test queries against the same
invindex. The first series is done using a simple query call:
my $hits = $searcher->search(query => 'organic');
The second series is done using TermQuery:
my $term = KinoSearch::Index::Term->new(title => 'organic');
my $by_title = KinoSearch::Search::TermQuery->new(term => $term);
my $hits = $searcher->search(query => $by_title);
I expect both series to produce the same results, since there's only
one field indexed per document. However, the output is different for
some search terms:
Test searches:
cotton: 10 results
bags: 29 results
organic: 18 results
bamboo: 7 results
clothes: 7 results
Test term searches:
cotton: 10 results
bags: 0 results
organic: 0 results
bamboo: 7 results
clothes: 0 results
When I remove the stemmer (KinoSearch::Analysis::Stemmer->new(language
=> 'en')) from the list of analyzers for both index and search, the
results of both series are the same.
Am I doing something wrong, or is this an actual bug? (The examples
below are done with 0.15, but I've tried 0.20_04, and it seemed to
have the same problem.)
Thanks.
--
-----------------------------------------------------
Evaldas Imbrasas
http://www.imbrasas.com
It's my 2nd day looking into KinoSearch, so I'm sorry if I'm missing
something obvious, but the behavior I'm seeing is certainly weird.
For debugging purposes, I've minimized the index to just one field
('title'), and I'm doing a series of test queries against the same
invindex. The first series is done using a simple query call:
my $hits = $searcher->search(query => 'organic');
The second series is done using TermQuery:
my $term = KinoSearch::Index::Term->new(title => 'organic');
my $by_title = KinoSearch::Search::TermQuery->new(term => $term);
my $hits = $searcher->search(query => $by_title);
I expect both series to produce the same results, since there's only
one field indexed per document. However, the output is different for
some search terms:
Test searches:
cotton: 10 results
bags: 29 results
organic: 18 results
bamboo: 7 results
clothes: 7 results
Test term searches:
cotton: 10 results
bags: 0 results
organic: 0 results
bamboo: 7 results
clothes: 0 results
When I remove the stemmer (KinoSearch::Analysis::Stemmer->new(language
=> 'en')) from the list of analyzers for both index and search, the
results of both series are the same.
Am I doing something wrong, or is this an actual bug? (The examples
below are done with 0.15, but I've tried 0.20_04, and it seemed to
have the same problem.)
Thanks.
--
-----------------------------------------------------
Evaldas Imbrasas
http://www.imbrasas.com