facet data cleanup

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

facet data cleanup

Naomi Dushay
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
Reply | Threaded
Open this post in threaded view
|

Re: [Blacklight-development] facet data cleanup

Erik Hatcher-3

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