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 Naomi Dushay <nd...@stanford.edu> on 2010/06/08 22:57:23 UTC

facet data cleanup

Hi folks,

We have a data cleanup effort going on here, and I thought I would  
share some information about how to poke around your facet values.   
Most of this comes from:
	http://wiki.apache.org/solr/SimpleFacetParameters


Exploring Facet Values:
-------

facet field to examine:			facet.field=
number of values to return:   	facet.limit=n
offset into the values:   		facet.offset=n
sort the facets alphabetically:	facet.sort=index

http://your.solr.baseurl/select?rows=0&facet.field=ffldname&facet.sort=index&facet.limit=250&facet.offset=0


Missing Facet Values:
-------

to find how many documents are missing values:		 
facet.missing=true&facet.mincount=really big
	http://your.solr.baseurl/select?rows=0&facet.field=ffldname&facet.mincount=10000000&facet.missing=true

	to find the documents with missing values:
		http://your.solr.baseurl/select?qt=standard&q=+uniquekey:[* TO *] - 
ffldname:[* TO *]

		number of rows:		rows=
		offset:				start=



- Naomi Dushay
Stanford University Libraries
http://searchworks.stanford.edu   <--  Blacklight on top of Solr

Re: [Blacklight-development] facet data cleanup

Posted by Erik Hatcher <er...@mac.com>.
On Jun 8, 2010, at 1:57 PM, Naomi Dushay wrote:
> Missing Facet Values:
> -------
>
> to find how many documents are missing values:		 
> facet.missing=true&facet.mincount=really big
> 	http://your.solr.baseurl/select?rows=0&facet.field=ffldname&facet.mincount=10000000&facet.missing=true
>
> 	to find the documents with missing values:
> 		http://your.solr.baseurl/select?qt=standard&q=+uniquekey:[* TO *] - 
> ffldname:[* TO *]

You could shorten that query to just q=-field_name:[* TO *]

Solr's "lucene" query parser supports top-level negative clauses.

And I'm assuming every doc has a unique key, so you could use *:*  
instead of uniquekey:[* TO *] - but I doubt one is really better than  
the other.

	Erik