Ah! Looks like that'll work. Thanks Yonik! For other folks listening in, he's suggesting not using Luke, and instead reverting to a regular faceted query.
The full facet query URL would then be: http://localhost:8983/solr/select?facet=true&facet.field=title&facet.limit=1000&q=state:CA Vs. my attempted Luke URL of: http://localhost:8983/solr/admin/luke?fl=title&numTerms=1000&q=state:CA The output is still in XML, though the XPath to the terms is a bit different. The Facet XPath is something like: /response/l...@name='facet_count']/l...@name='facet_fields']/l...@name='title']/int/@name The Luke XPath (terms for all docs) is something like: /response/l...@name='fields']/l...@name='title']/l...@name='topTerms']/int/@name -- Mark Bennett / New Idea Engineering, Inc. / mbenn...@ideaeng.com Direct: 408-733-0387 / Main: 866-IDEA-ENG / Cell: 408-829-6513 On Mon, Aug 3, 2009 at 2:49 PM, Yonik Seeley <yo...@lucidimagination.com>wrote: > Sounds like faceting? > q=state:CA&facet=true&facet.field=title&facet.limit=1000 > > -Yonik > http://www.lucidimagination.com > > > On Mon, Aug 3, 2009 at 5:39 PM, Mark Bennett<mbenn...@ideaeng.com> wrote: > > You can get a nice list of terms for a field using the Luke handler: > > http://localhost:8983/solr/admin/luke?fl=title&numTerms=1000 > > > > But what I'd really like is to get the terms for the docs that match a > > particular slice of the index. > > > > For example, let's say I have records for all 50 states, but I want to > get > > the top 1,000 terms for documents in California. > > > > I'd like to add q or fq like this: > > > http://localhost:8983/solr/admin/luke?fl=title&numTerms=1000&q=state:CA > > OR > > > http://localhost:8983/solr/admin/luke?fl=title&numTerms=1000&fq=state:CA > > > > Although I don't get any errors, this syntax doesn't seem to filter the > > terms. Not a bug, nobody ever said it would. > > > > But has anybody written a utility to get term instances for a subset of > the > > index, based on a query? And to be clear, I was hoping to get all of the > > terms in matching documents, not just terms that are also present in the > > query. > > > > Thanks, > > Mark > > > > -- > > Mark Bennett / New Idea Engineering, Inc. / mbenn...@ideaeng.com > > Direct: 408-733-0387 / Main: 866-IDEA-ENG / Cell: 408-829-6513 > > >