Philippe -

/browse is a Solr request handler defined in solrconfig.xml.  It’s 
configuration is shipped using edismax and q.alt=*:*, meaning that if there is 
no client provided query string it defaults to all documents.   You could 
either adjust the configuration such that an empty /browse request returns no 
results (easier to tinker if you do /browse?wt=xml) or perhaps adjust the 
template (maybe in results_list.vm) to check for the q parameter existence, 
except you may want to show results without a query if the user facets so 
you’ll have to keep that in mind as well.

        Erik

On Jun 5, 2014, at 3:21 AM, DE ROCHAMBEAU, Philippe <pderochamb...@nytimes.com> 
wrote:

> Hi,
> 
> the Velocity example that comes with SOLR displays all data contained in
> the database when you connect to the following page with a browser:
> http://localhost:8983/solr/collection1/browse .
> 
> I have looked through collection1's Velocity templates, but unfortunately
> can't locate the code that creates a query to display all data.
> 
> Does anyone know where it is?
> 
> Furthermore, apart from running a query that searches for an empty string
> (eg, http://localhost:8983/solr/collection1/browse?q=%22%22) , are there
> any other ways to make SOLR display no results?
> 
> [I am asking because my client doesn't like to see all data when she first
> accesses the SOLR Search Page.]
> 
> Many thanks.
> 
> Philippe

Reply via email to