lundi 21 septembre 2015

Thinking Sphinx : More results than documents in index

I noticed something strange with the total_entries count for my results.

When indexing my document, I see that there are 8027 documents indexed :

using config file 'myapp/config/production.sphinx.conf'...
indexing index 'variant_nl_core'...
collected 8027 docs, 2.0 MB
collected 16124 attr values
sorted 0.0 Mvalues, 100.0% done
sorted 7.4 Mhits, 100.0% done
total 8027 docs, 2007375 bytes
total 15.138 sec, 132600 bytes/sec, 530.23 docs/sec
indexing index 'variant_nl_delta'...
collected 0 docs, 0.0 MB
collected 0 attr values
sorted 0.0 Mvalues, 100.0% done
total 0 docs, 0 bytes
total 0.010 sec, 0 bytes/sec, 0.00 docs/sec
skipping non-plain index 'variant_nl'...
indexing index 'variant_fr_core'...
collected 8027 docs, 2.0 MB
collected 16124 attr values
sorted 0.0 Mvalues, 100.0% done
sorted 6.6 Mhits, 100.0% done
total 8027 docs, 2048826 bytes
total 16.959 sec, 120808 bytes/sec, 473.31 docs/sec
indexing index 'variant_fr_delta'...
collected 0 docs, 0.0 MB
collected 0 attr values
sorted 0.0 Mvalues, 100.0% done
total 0 docs, 0 bytes
total 0.013 sec, 0 bytes/sec, 0.00 docs/sec
skipping non-plain index 'variant_fr'...
total 64311 reads, 0.045 sec, 1.2 kb/call avg, 0.0 msec/call avg
total 209 writes, 0.097 sec, 789.4 kb/call avg, 0.4 msec/call avg

When I do a search with nil as query, I'd expect to have all 8027 document matching the search.

r = Variant.search nil

But when I check the number of matching entries with total_entries, I actually get more results :

r.total_entries
 => 15054 

How is this possible ? What I am missing ?

Aucun commentaire:

Enregistrer un commentaire