You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Dev Team <de...@gmail.com> on 2008/10/02 16:51:51 UTC

Quick RSS feed questions

Hi everybody,
     With regard to RSS feeds; I noticed that there's a stylesheet to
convert the output of a Solr search into RSS format in the
example\solr\conf\xlst directory. My questions are:

1) Where can I find docs on how to get Solr to feed RSS directly?

2) Correct me if I'm wrong here:  Normal searches return results based on
what's indexed at the time. If documents are only added to an index, then
subsequent searches (ordered by date new-to-oldest) will have the newer docs
appear on top, and thus an RSS feed will have "new entries" when the search
is re-performed.
     However, how do you handle RSS feeds for indexes where data can be both
added and removed? For example, if I want to have an RSS feed of users on my
site, I want new users to show up as new items in the RSS feed as they come
along. However, users don't stick around forever, they can also disappear
from the database. Similarly, users can change their information and thus
they may not match a particular query anymore (and would thus disappear from
the RSS feed, right?).
     Wouldn't this cause havoc for RSS readers if results changed often?
Aren't they used to getting only new items and the old items hanging around?
Lists of users are not like blogs, and yet (for my application) some people
may want to have a feed of new users of a particular type (where users are
free to change their type at any time).
     Any advice about how to approach this would be appreciated.

Sincerely,

     Daryl.

Re: Quick RSS feed questions

Posted by Chris Hostetter <ho...@fucit.org>.
: 1) Where can I find docs on how to get Solr to feed RSS directly?

if you mean "consume rss" you should take a look at the DataImporthandler 
-- it let's you configure XPath expressions for extracting 
documents/fields from xml files.  If you mean "produce rss" the 
XSLTResponseWriter can apply a stylesheet server side to generate RSS 
(that's why the example rss XSLT exists)

:      However, how do you handle RSS feeds for indexes where data can be both
: added and removed? For example, if I want to have an RSS feed of users on my
: site, I want new users to show up as new items in the RSS feed as they come
: along. However, users don't stick around forever, they can also disappear
: from the database. Similarly, users can change their information and thus
: they may not match a particular query anymore (and would thus disappear from
: the RSS feed, right?).
:      Wouldn't this cause havoc for RSS readers if results changed often?

This question is a little out of the scope of a Solr discussion.  The 
potential issues you describe with trying to serve data using RSS are 
going to be something you'll have to consider regardless of wether the RSS 
is generated from a Solr result, or a database result, or even a flat file 
on disk that you manually edit by hand.  It's all very dependent on what 
your clients are expecting to see in that feed in each of hte situations 
(delete/edit) that you describe.

If you can decide how you *want* the resulting feed to look in each of 
those use cases, you cna probably model the Solr Documents in a way to 
represent it.



-Hoss