lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Jelsma <>
Subject RE: Missing facet values for zero counts
Date Wed, 29 Sep 2010 13:42:48 GMT
I'm afraid you'd have to add the missing countries in your application. If it's not in the
index, it will not be returned. You last question is possible, the facet.query parameter allows
you to rely on other conditions to generate a facet count. But if the missing countries are
not in the index, you cannot query against them. 
-----Original message-----
From: Allistair Crossley <>
Sent: Wed 29-09-2010 15:38
Subject: Missing facet values for zero counts

Hello list,

I am implementing a directory using Solr. The user is able to search with a free-text query
or 2 filters (provided as pick-lists) for country. A directory entry only has one country.

I am using Solr facets for country and I use the facet counts generated initially by a *:*
search to generate my pick-list.

This is working fairly well but there are a couple of issues I am facing.

Specifically the countries pick-list does not contain ALL possible countries. It only contains
those that have been indexed against a document. 

I have looked at facet.missing but I cannot see how this will work - if no documents have
a country of Sweden, then how would Solr know to generate a missing total of zero for Sweden
- it's never heard of it.

I feel I am missing something - is there a way by which you tell Solr all possible countries
rather than relying on counts generated from the index? 

The countries in question reside in a database table belonging to our application.

Thanks, Allistair 
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message