Sorry, too many assumoptions. The query needs to be *:* and then you need to add facet.field parameters for each facet you want back. Something along the lines of:
http://localhost:8983/solr/select?q=*:*&rows=0&facet=true&facet.field=ty pe&facet.field=quantity - will -----Original Message----- From: Martin Grotzke [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 22, 2007 10:43 AM To: solr-user@lucene.apache.org Subject: RE: Interesting Practical Solr Question On Tue, 2007-05-22 at 10:07 -0400, Will Johnson wrote: > Possible solutions inline: > > 1) I use facets and want to return the facets for "all documents" as the > starting point of the user interface. In other words, I want to /select > the facet counts for about 10 facets (like states for example) for all > documents without having to do a search. Is this possible? > > You could cache the results and just redisplay them over and over but > why not just run a search for *:* and display that. I already wondered how to get all facets, but simply performing a search for *:* does not work for me, e.g. with the query string http://localhost:8983/solr/select?q=*:*&rows=0&facet=true&facet.limit=5 How exactly do you run the search? Does it depend on the solr configuration if this works? Thanx && cheers, Martin > The query will be > super fast assuming the facets are in the filter cache. I routinely get > 0ms for qtime on exactly the same type of query with 5M docs. (I don't > really believe the 0ms but it's nice to see) > > 2) Each document will be shown to the user with a check box next to it. > I want to user to be able to select certain documents and "save" their > ids some where else. This is not a problem. However, I also want to give > the user an ability to say "Select All Documents". This would need to > save the ids of ALL documents found with user's given query and query > filter (based on the facets that they selected). This list could > potentially contain over 10,000 documents. Question: How to easily and > quickly grab the IDs of all these documents? > > Why not just save the query itself instead of the id's? if you're > worried about new docs showing up that weren't available when the user > saved the docs you could always filter them by a 'createdtime' field > that gets set when you index the docs. > > 3) Once the user saves the list, I want them to be able to do further > searches by do a "negative union" with the set of ids they already > saved. So for example, if they already saved 1000 ids into one of their > lists, they would need to be able to get results from Solr that match > their query but are NOT in the set of 1000 ids that they already saved. > Is this possible? > > Even more reason to save the queries and not the id's. then its > > (query1expr) NOT (query2expr) > > - will > > > > > ________________________________________________________________________ > ____________ > Sucker-punch spam with award-winning protection. > Try the free Yahoo! Mail Beta. > http://advision.webevents.yahoo.com/mailbeta/features_spam.html > -- Martin Grotzke http://www.javakaffee.de/blog/