Hi there,
I'm using the devel version (0.20_05). My index contains 74330
documents. I have created a field in that index which is set to the
same value for all records so that I can easily retrieve every
document (useful whilst testing). i.e. search.pl q="all:1" Calling
$hits->total_hits on that search gives me '74330' which is what I
expect.
Performing a search on another field, fieldx:foo, gives me 4481 hits.
I have confirmed that this quantity is correct for this field.
When I do the following : search.pl q="all:1 AND fieldx:foo", I get a
lower quantity of 4449 hits. I've lost 32 documents.
I've diffed the output of the two searches involving fieldx to
identify the missing documents and manually reviewed their contents.
As far as I can see, they *should* be included, as the missing
documents do contain 'all:1' and also contain 'fieldx:foo'.
In MySchema, the 'all' and 'fieldx' fields are indexed and stored.
They aren't being analyzed.
I'm constructing my query using QueryParser, with the default_boolop
set to 'AND'.
#-----
my $qp = KinoSearch::QueryParser->new(
schema => MySchema->new,
default_boolop => 'AND',
);
$qp->set_heed_colons(1);
my $reader = KinoSearch::Index::IndexReader->open(
invindex => MySchema->read( './index' ),
);
my $searcher = KinoSearch::Searcher->new( reader => $reader );
my $hits = $searcher->search(
query => $qp->parse( $q ),
offset => 0,
num_wanted => 100000,
);
warn $hits->total_hits;
#-----
I have also noticed my results vary depending upon the order of the
fields in my query. Searching for 'fieldx:foo AND all:1' yields 4453
hits. I don't expect this to happen as the 'all:1' is true for every
document in the index.
Why would the 3 searches not yield the same results? As I understand
it, the queries are effectively the same - although KinoSearch doesn't
treat them so.
Many thanks,
Adam
_______________________________________________
KinoSearch mailing list
KinoSearch@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch
I'm using the devel version (0.20_05). My index contains 74330
documents. I have created a field in that index which is set to the
same value for all records so that I can easily retrieve every
document (useful whilst testing). i.e. search.pl q="all:1" Calling
$hits->total_hits on that search gives me '74330' which is what I
expect.
Performing a search on another field, fieldx:foo, gives me 4481 hits.
I have confirmed that this quantity is correct for this field.
When I do the following : search.pl q="all:1 AND fieldx:foo", I get a
lower quantity of 4449 hits. I've lost 32 documents.
I've diffed the output of the two searches involving fieldx to
identify the missing documents and manually reviewed their contents.
As far as I can see, they *should* be included, as the missing
documents do contain 'all:1' and also contain 'fieldx:foo'.
In MySchema, the 'all' and 'fieldx' fields are indexed and stored.
They aren't being analyzed.
I'm constructing my query using QueryParser, with the default_boolop
set to 'AND'.
#-----
my $qp = KinoSearch::QueryParser->new(
schema => MySchema->new,
default_boolop => 'AND',
);
$qp->set_heed_colons(1);
my $reader = KinoSearch::Index::IndexReader->open(
invindex => MySchema->read( './index' ),
);
my $searcher = KinoSearch::Searcher->new( reader => $reader );
my $hits = $searcher->search(
query => $qp->parse( $q ),
offset => 0,
num_wanted => 100000,
);
warn $hits->total_hits;
#-----
I have also noticed my results vary depending upon the order of the
fields in my query. Searching for 'fieldx:foo AND all:1' yields 4453
hits. I don't expect this to happen as the 'all:1' is true for every
document in the index.
Why would the 3 searches not yield the same results? As I understand
it, the queries are effectively the same - although KinoSearch doesn't
treat them so.
Many thanks,
Adam
_______________________________________________
KinoSearch mailing list
KinoSearch@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch