Permalink
Commits on Dec 16, 2011
  1. Added an example of how to intercept exceptions due to incorrect user…

    … queries
    
    When the users enters an incorrect query, _Tire_ raises a `Tire::Search::SearchRequestFailed` exception.
    
    It is unfortunate to propagate the raw exception to the page, and display the “Something went wrong” page
    in this case -- it's better to display the default result set, or the search form, and indicate to the
    user her query was incorrect.
    
    This commit contains a trivial implementation via the _Rails'_ `rescue_from` method.
    
    See <http://github.com/karmi/tire/issues/164#issuecomment-3096189>.
    committed Dec 16, 2011
  2. Changed Article mapping so that we can search & facet against author …

    …names
    
    Based on previous refactoring, we're now addding a specific mapping for the `author` property,
    so that it's analyzed as "multi field" property.
    
    This means it's:
    
    1. Split into tokens the usual way search engine works, with the snowball analyzer.
    2. Left "as is", without any modification, as an "exact" sub-property.
    
    This illustrates one of the usual use-cases for multi field properties: you want to search
    against them as usual, but you also want to use their literal, unmodified value for aggregations.
    
    This allows us to get rid of database calls (`Author.find(facet['term'])`) in the view layer,
    and use information already in the index for displaying the faceted navigation sidebar.
    
    Notice we facet against the `author.name.exact` field, and that we have changed the mechanics
    of limiting results based on user's choice in right-hand sidebar: instead of query, we are
    using filter, again on the `author.name.exact` field.
    
    This means, the **query** is used to limit the results, but **faceted navigation** still displays
    the distribution of results among authors, when you limit the results to a specific author,
    because a **filter** is used; facets are bound only by queries, not filters.
    
    See <http://www.elasticsearch.org/guide/reference/api/search/facets/index.html> for more information.
    committed Dec 16, 2011
  3. Changed the Article#to_indexed_json to include data from associations

    In the published version, special methods `Article#author_name` and `Article#comments_count` were added,
    so we can display some data about authorship and comments from associations.
    
    This would be less then ideal in a bigger codebase, and, moreover, Elasticsearch & Tire make it
    trivial to support this use case.
    
    The only thing we need to do is to `include` the selected information from the associated models
    in the `Article#to_indexed_json` declaration.
    
    In this way, the information about:
    
    * Name of the article author
    * Name of commenters and bodies of their comments
    
    is included in the index. This has two benefits:
    
    1. It's **searchable**! :) We can search within the comments in the same way as we do within articles.
    2. We don't have to add special methods, and can revert the HTML layer to the original state.
    committed Dec 16, 2011
  4. [FIX] Fixed an error where the `/article/:id` used un-available metho…

    …ds on article.author
    committed Dec 16, 2011
Commits on Dec 13, 2011
  1. @ryanb

    adding episodes 306 and 307

    ryanb committed Dec 13, 2011
Commits on Dec 9, 2011
  1. @ryanb

    adding revised episode 120

    ryanb committed Dec 9, 2011
Commits on Dec 5, 2011
  1. @ryanb

    adding episodes 304 and 305

    ryanb committed Dec 5, 2011
Commits on Dec 3, 2011
  1. @ryanb
Commits on Dec 2, 2011
  1. @ryanb

    adding revised episode 182

    ryanb committed Dec 2, 2011
Commits on Nov 29, 2011
  1. @ryanb

    fixing 303 url_formatter

    ryanb committed Nov 29, 2011
  2. @ryanb

    adding episodes 302 and 303

    ryanb committed Nov 29, 2011
Commits on Nov 26, 2011
  1. @ryanb

    adding revised episode 88

    ryanb committed Nov 26, 2011
Commits on Nov 21, 2011
  1. @ryanb

    adding episode 301

    ryanb committed Nov 21, 2011
Commits on Nov 17, 2011
  1. @ryanb

    adding episode 111

    ryanb committed Nov 17, 2011
Commits on Nov 15, 2011
  1. @ryanb

    adding episode 298

    ryanb committed Nov 15, 2011
Commits on Nov 10, 2011
  1. @ryanb

    adding revised episode 102

    ryanb committed Nov 10, 2011
Commits on Nov 7, 2011
  1. @ryanb

    adding episodes 296 and 297

    ryanb committed Nov 7, 2011
Commits on Nov 4, 2011
  1. @ryanb

    adding revised episode 153

    ryanb committed Nov 4, 2011
Commits on Oct 31, 2011
  1. @ryanb

    adding episodes 294 and 295

    ryanb committed Oct 31, 2011
Commits on Oct 28, 2011
  1. @ryanb

    adding episode 158 revised

    ryanb committed Oct 28, 2011
Commits on Oct 25, 2011
  1. @ryanb

    adding episodes 292 and 293

    ryanb committed Oct 25, 2011
Commits on Oct 20, 2011
  1. @ryanb

    adding episode 104

    ryanb committed Oct 20, 2011
Commits on Oct 17, 2011
  1. @ryanb

    adding episodes 290 and 291

    ryanb committed Oct 17, 2011
Commits on Oct 13, 2011
  1. @ryanb

    adding revised episode 147

    ryanb committed Oct 13, 2011
Commits on Oct 10, 2011
  1. @ryanb

    adding episodes 288 and 289

    ryanb committed Oct 10, 2011
Commits on Oct 6, 2011
  1. @ryanb

    adding revised episode 51

    ryanb committed Oct 6, 2011
Commits on Oct 4, 2011
  1. @ryanb
Commits on Oct 3, 2011
  1. @ryanb
  2. @ryanb

    adding episode 287

    ryanb committed Oct 3, 2011
  3. @ryanb

    adding episode 286

    ryanb committed Oct 3, 2011
Commits on Sep 23, 2011
  1. @ryanb

    adding episode 285

    ryanb committed Sep 23, 2011
Commits on Sep 19, 2011
  1. @ryanb

    adding episode 284

    ryanb committed Sep 19, 2011
Commits on Sep 12, 2011
  1. @ryanb

    adding episode 283

    ryanb committed Sep 12, 2011
Commits on Aug 22, 2011
  1. @ryanb

    adding episode 280

    ryanb committed Aug 22, 2011
Commits on Aug 14, 2011
  1. @ryanb

    adding episode 279

    ryanb committed Aug 14, 2011