Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2
    • Component/s: clients - java
    • Labels:
      None

      Description

      A quick .xsl file for transforming solr queries into RSS feeds. To get the date and time in properly you'll need an XSL 2.0 processor, as in http://wiki.apache.org/solr/XsltResponseWriter . Tested to work with the example solr distribution in the nightly.

      1. atom.xsl
        2 kB
        Brian Whitman
      2. rss.xsl
        2 kB
        Brian Whitman

        Activity

        Hide
        Brian Whitman added a comment -

        Attaching the rss.xsl file – just put this in solr/conf/xslt/ and then try

        http://localhost:8983/solr/select?q=ipod&wt=xslt&tr=rss.xsl

        Show
        Brian Whitman added a comment - Attaching the rss.xsl file – just put this in solr/conf/xslt/ and then try http://localhost:8983/solr/select?q=ipod&wt=xslt&tr=rss.xsl
        Hide
        Hoss Man added a comment -

        these seems like a handy little example to me ... anyone see any objections to including this as example/solr/conf/xslt/rss_example.xsl assuming we...

        1) add the stock License header
        2) change the title to "Example Solr RSS Feed"
        3) fill in the main description tag with some text like...
        This has been formatted by the sample "rss_example.xsl" transform - use your own XSLT to get a nicer RSS feed
        4) eliminate the docpos variable since it isn't used.

        Show
        Hoss Man added a comment - these seems like a handy little example to me ... anyone see any objections to including this as example/solr/conf/xslt/rss_example.xsl assuming we... 1) add the stock License header 2) change the title to "Example Solr RSS Feed" 3) fill in the main description tag with some text like... This has been formatted by the sample "rss_example.xsl" transform - use your own XSLT to get a nicer RSS feed 4) eliminate the docpos variable since it isn't used.
        Hide
        Otis Gospodnetic added a comment -

        +1 for including this. I imagine a lot of people will want this to provide "subscribe to search results for a saved search" type functionality.

        Show
        Otis Gospodnetic added a comment - +1 for including this. I imagine a lot of people will want this to provide "subscribe to search results for a saved search" type functionality.
        Hide
        Walter Underwood added a comment -

        What kind of RSS?

        -1 unless it is Atom. The nine variants of RSS have some nasty interop problems, even between
        those that are supposed to implement the same spec.

        Even better, a GData interface returning Atom.

        Show
        Walter Underwood added a comment - What kind of RSS? -1 unless it is Atom. The nine variants of RSS have some nasty interop problems, even between those that are supposed to implement the same spec. Even better, a GData interface returning Atom.
        Hide
        Brian Whitman added a comment -

        I'm not involved or familiar with the RSS wars but I will say that this is a quick example of getting RSS out of Solr in the easiest possible way. It worked on every single browser and newsreader I tried it on. There's no reason we can't also include an atom_example.xsl as well. I don't understand why you would use GData for this at all, but i am probably out of my league there.

        +1 for adding except remove the XSL2.0 references, not worth the confusion, date handling is not necessary for the exampledocs test case.

        Show
        Brian Whitman added a comment - I'm not involved or familiar with the RSS wars but I will say that this is a quick example of getting RSS out of Solr in the easiest possible way. It worked on every single browser and newsreader I tried it on. There's no reason we can't also include an atom_example.xsl as well. I don't understand why you would use GData for this at all, but i am probably out of my league there. +1 for adding except remove the XSL2.0 references, not worth the confusion, date handling is not necessary for the exampledocs test case.
        Hide
        Walter Underwood added a comment -

        I wasn't in the RSS wars, either, but I was on the Atom working group. That was a bunch of volunteers making a clean, testable spec for RSS functionality (http://www.ietf.org/rfc/rfc4287). RSS 2.0 has some bad ambiguities, especially around ampersand and entities in titles. The default has changed over the years and clients do different, incompatible things.

        GData is just a way to do search result stuff that we would need anyway. It is standard set of URL parameters for query, start-index, and categories, and a few Atom extensions for total results, items per page, and next/previous.

        http://code.google.com/apis/gdata/reference.html

        Show
        Walter Underwood added a comment - I wasn't in the RSS wars, either, but I was on the Atom working group. That was a bunch of volunteers making a clean, testable spec for RSS functionality ( http://www.ietf.org/rfc/rfc4287 ). RSS 2.0 has some bad ambiguities, especially around ampersand and entities in titles. The default has changed over the years and clients do different, incompatible things. GData is just a way to do search result stuff that we would need anyway. It is standard set of URL parameters for query, start-index, and categories, and a few Atom extensions for total results, items per page, and next/previous. http://code.google.com/apis/gdata/reference.html
        Hide
        Otis Gospodnetic added a comment -

        Plus there is contrib/gdata-server under Lucene waiting to be used, so there already is gData-something in Luceneland.

        Show
        Otis Gospodnetic added a comment - Plus there is contrib/gdata-server under Lucene waiting to be used, so there already is gData-something in Luceneland.
        Hide
        Ryan McKinley added a comment -

        As an example, I don't think it matters if this is RSS, Atom, or GData. It just needs to show that you can transform solr results into a "standard" syndication format.

        Any real example would need to change the specifics dramatically (unless you really wanted the description to be a list of "features" and link to http://localhost:8983/solr/select?q=id:$

        {id}

        )

        As hoss suggests, I think this is good to include as long as the comments make it clear that you need to change stuff to make it 'real' - this may include reformatting to atom or gdata...

        Show
        Ryan McKinley added a comment - As an example, I don't think it matters if this is RSS, Atom, or GData. It just needs to show that you can transform solr results into a "standard" syndication format. Any real example would need to change the specifics dramatically (unless you really wanted the description to be a list of "features" and link to http://localhost:8983/solr/select?q=id:$ {id} ) As hoss suggests, I think this is good to include as long as the comments make it clear that you need to change stuff to make it 'real' - this may include reformatting to atom or gdata...
        Hide
        Brian Whitman added a comment -

        Someone else questioned my choice of RSS spec last night. I don't want my tiny Solr contribution to become a political issue! +1 on noting that it's incomplete and will have to be changed for the user's specific scenario. I'll make it Atom.

        Show
        Brian Whitman added a comment - Someone else questioned my choice of RSS spec last night. I don't want my tiny Solr contribution to become a political issue! +1 on noting that it's incomplete and will have to be changed for the user's specific scenario. I'll make it Atom.
        Hide
        Brian Whitman added a comment -

        Adding atom.xsl (replaces rss.xsl)

        Changes:

        • Added apache header
        • Atom, not RSS 2.0

        It validates on feedvalidator.org as atom 1.0 except for the link rel=self, since that's on localhost)

        Show
        Brian Whitman added a comment - Adding atom.xsl (replaces rss.xsl) Changes: Added apache header Atom, not RSS 2.0 It validates on feedvalidator.org as atom 1.0 except for the link rel=self, since that's on localhost)
        Hide
        Yonik Seeley added a comment -

        +1 on including this in the 1.2 release

        Show
        Yonik Seeley added a comment - +1 on including this in the 1.2 release
        Hide
        Hoss Man added a comment -

        i have no interest in format holy wars, and i'm a big fan of well defined standards, but the fact remains that even if "RSS" is ambiguous to feed parsers, the concept isn't ambiguous to people, and the more examples we have for stylizing Solr responses the better ... so i've committed them both with some whitespace cleanup and standardized blurbs about being for example purposes only (matches the HTML example blurb).

        Committed revision 541391.

        Show
        Hoss Man added a comment - i have no interest in format holy wars, and i'm a big fan of well defined standards, but the fact remains that even if "RSS" is ambiguous to feed parsers, the concept isn't ambiguous to people, and the more examples we have for stylizing Solr responses the better ... so i've committed them both with some whitespace cleanup and standardized blurbs about being for example purposes only (matches the HTML example blurb). Committed revision 541391.

          People

          • Assignee:
            Hoss Man
            Reporter:
            Brian Whitman
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development