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 zoku <ma...@kjur.de> on 2009/12/29 14:59:50 UTC

Limiting Solr queries to predefined Values

Hi there!
Is it possible, to limit the Solr Queries to predefined values e.g.:
If the User enters "/select?q=anyword&fq=anyfilter&rows=13" then the filter
and rows arguments are ignored an overwritten by the predefined values
"specialfilter" and "6".

The goal is to prevent users from getting particular information (e.g. very
big fields to control bandwidth) sent to their browser.

Maybe it could be done by blocking the access to the /select-path using
resin (if it used regex to discribe <url-pattern>).

Sincerely
Manuel Helbing
-- 
View this message in context: http://old.nabble.com/Limiting-Solr-queries-to-predefined-Values-tp26954887p26954887.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Limiting Solr queries to predefined Values

Posted by Erik Hatcher <er...@gmail.com>.
On Dec 29, 2009, at 8:59 AM, zoku wrote:
> Hi there!
> Is it possible, to limit the Solr Queries to predefined values e.g.:
> If the User enters "/select?q=anyword&fq=anyfilter&rows=13" then the  
> filter
> and rows arguments are ignored an overwritten by the predefined values
> "specialfilter" and "6".

Yes, you can set up the request handler mapping with an  
"invariant" (instead of "defaults") section with those parameters  
specified in solrconfig.xml.

However, with fq, you may want to put that in an "appends" section  
instead, so that other filters can be specified from the client as well.

	Erik