On 9/5/2018 7:17 AM, shruti suri wrote:
I am using a custom handler with edismax parser. I am using uf parameter in
the handler to restrict some fields from search.  But uf is not working with
post filter(fq). I want to restricted same fields in fq, so that people
could not filter on some fields. Please suggest how can I do that.

What is the fq value?  This has not been shared.

Unless you explicitly request a parser *IN THE FQ PARAMETER VALUE*, the filter will use the Lucene parser.  And it will not be a postfilter if it is using lucene, dismax, edismax or certain other parsers -- those parsers do not implement PostFilter.  The lucene parser does not support the uf parameter.

I would say that it is not normal practice to put user input into fq without modification.  That should go into q, and there should probably be some kind of validation in your code on user input before it gets to Solr to look for possible problems.

Adding {!edismax} to the start of the fq value *might* make it honor the uf parameter, but I have not tried this.

Thanks,
Shawn

Reply via email to