0

I'm working on a open-source project, BTC-Stores, and I think I found a issue in Rails Sunspot gem.

In my architecture I have Items, and each Item have one Country and one Category. The facets and the search by filters already is working (thanks to this answer), but I found a strange thing in count and mainly when showing my items.

First of all, if I go to rails console and type the following, it prints:

Item.count # => 329


First strange thing:

When I search, Sunspot shows me more than 329 stores. See the page "breadcrumb" and understand:

enter image description here What can be making this problem?

Second strange thing:

When I Search, the first page is (almost) okay, like you saw above. But when I go to "Page 2", I receive:

enter image description here

What means that none store was found by Sunspot search. Again, another "but": when I go to "Page 67", the last page, it's working again! (and still working for the last pages)

enter image description here

So, can you understand what's the problem without see any code? Anyway, thanks for help!

Community
  • 1
  • 1
Paladini
  • 4,522
  • 15
  • 53
  • 96
  • (P.S: The "stores" without images isn't a problem [well, it's, but I don't want be answered about that]) – Paladini Jan 09 '14 at 10:19

1 Answers1

0

Answer found!

I solved this issue reindexing Sunspot, as documentation said here. So, if you have the same problem I had, try run in Terminal:

rake sunspot:solr:reindex

Well, here solved all issues. :)

Paladini
  • 4,522
  • 15
  • 53
  • 96