Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Dec 16, 2011

  1. Karel Minarik

    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>.
    authored
  2. Karel Minarik

    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.
    authored
  3. Karel Minarik

    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.
    authored
  4. Karel Minarik

    [FIX] Fixed an error where the `/article/:id` used un-available metho…

    …ds on article.author
    authored

Dec 13, 2011

  1. Ryan Bates

    adding episodes 306 and 307

    ryanb authored

Dec 09, 2011

  1. Ryan Bates

    adding revised episode 120

    ryanb authored

Dec 05, 2011

  1. Ryan Bates

    adding episodes 304 and 305

    ryanb authored

Dec 03, 2011

  1. Ryan Bates

    adding batman image to revised episode 182

    ryanb authored

Dec 02, 2011

  1. Ryan Bates

    adding revised episode 182

    ryanb authored

Nov 29, 2011

  1. Ryan Bates

    fixing 303 url_formatter

    ryanb authored
  2. Ryan Bates

    adding episodes 302 and 303

    ryanb authored

Nov 26, 2011

  1. Ryan Bates

    adding revised episode 88

    ryanb authored

Nov 21, 2011

  1. Ryan Bates

    adding episode 301

    ryanb authored

Nov 17, 2011

  1. Ryan Bates

    adding episode 111

    ryanb authored

Nov 15, 2011

  1. Ryan Bates

    adding episode 298

    ryanb authored

Nov 10, 2011

  1. Ryan Bates

    adding revised episode 102

    ryanb authored

Nov 07, 2011

  1. Ryan Bates

    adding episodes 296 and 297

    ryanb authored

Nov 04, 2011

  1. Ryan Bates

    adding revised episode 153

    ryanb authored

Oct 31, 2011

  1. Ryan Bates

    adding episodes 294 and 295

    ryanb authored

Oct 28, 2011

  1. Ryan Bates

    adding episode 158 revised

    ryanb authored

Oct 25, 2011

  1. Ryan Bates

    adding episodes 292 and 293

    ryanb authored

Oct 20, 2011

  1. Ryan Bates

    adding episode 104

    ryanb authored

Oct 17, 2011

  1. Ryan Bates

    adding episodes 290 and 291

    ryanb authored

Oct 13, 2011

  1. Ryan Bates

    adding revised episode 147

    ryanb authored

Oct 10, 2011

  1. Ryan Bates

    adding episodes 288 and 289

    ryanb authored

Oct 06, 2011

  1. Ryan Bates

    adding revised episode 51

    ryanb authored

Oct 04, 2011

  1. Ryan Bates

    episode 287 - fixing handle_none typo

    ryanb authored

Oct 03, 2011

  1. Ryan Bates

    episode 287 - fixing parameter ordering for present controller method

    ryanb authored
  2. Ryan Bates

    adding episode 287

    ryanb authored
  3. Ryan Bates

    adding episode 286

    ryanb authored

Sep 23, 2011

  1. Ryan Bates

    adding episode 285

    ryanb authored

Sep 19, 2011

  1. Ryan Bates

    adding episode 284

    ryanb authored

Sep 12, 2011

  1. Ryan Bates

    adding episode 283

    ryanb authored

Aug 22, 2011

  1. Ryan Bates

    adding episode 280

    ryanb authored

Aug 14, 2011

  1. Ryan Bates

    adding episode 279

    ryanb authored
Something went wrong with that request. Please try again.