I think it may be that you're passing :all in the first example - that gets
treated as a search query (as you can see in the log). Thinking Sphinx doesn't
have the concept of :first/:last/:all - it always returns paginated responses
of all the search results.
Also, your second log example doesn't match your query - but I'm guessing
that's just from testing different search terms ;)
--
Pat
On 05/08/2010, at 3:39 AM, tylr wrote:
> So I am working with a data model, which for reasons outside of my
> control are ugly. Here is an example of what is happening.
>
> $> Thing.search(:all, :conditions => {:idx_top_category => 'Note
> Cards})
> Sphinx Querying: 'all @idx_top_category Note Cards'
> Sphinx (0.003722s) Found 0 results
> => []
>
> This yields 0 (read zero) results.
>
> On the other hand if I search for...
>
> $> Thing.search('Note Cards').count
> Sphinx Querying: 'Seasonal Invitations'
> Sphinx (0.005707s) Found 313 results
> Paper Load (1.4ms) SELECT * FROM "things" WHERE ("things"."id" IN
> (52,65,66,69,116,169,170,203,211,214,217,218,225,228,231,237,239,240,241,248))
> => 20
>
> For demos sake, here's what my index looks like.
>
> define_index do
> indexes design_categories.flow_categories.design_section.title, :as
> => :idx_top_category
> end
>
> I've killed the searchd process, deleted all index files and rebuilt
> and indexed over and over.
>
> If I run the sql query in the sphinx.conf I get results like this...
>
> id | idx_top_category |
> sphinx_internal_id | class_crc | sphinx_deleted
> ------+-----------------------------------------------------------
> +--------------------+------------+----------------
> 1 | Invitations 0
> | 1 | 2413514514 | 0
> 2 | Invitations 0
> | 2 | 2413514514 | 0
> 3 | Invitations Note Cards 0
> | 3 | 2413514514 | 0
> 4 | 0 Invitations
> | 4 | 2413514514 | 0
>
> Any clues?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/thinking-sphinx?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en.