Re: user field(uf) not working with Post filter

2018-09-20 Thread shruti suri
Hi Shawn,

Passing "{!edismax}" with fq solves my requirements and now by passing
parser with fq, uf parameter is working.

Thanks
Shruti suri



-
Regards
Shruti
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: user field(uf) not working with Post filter

2018-09-18 Thread Shawn Heisey

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



Re: user field(uf) not working with Post filter

2018-09-18 Thread shruti suri
Hi Zheng,

I am using version 6.1.0. Basically, I want few fields to be blocked in fq.

Thanks



-
Regards
Shruti
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: user field(uf) not working with Post filter

2018-09-12 Thread Zheng Lin Edwin Yeo
Hi Shruti,

Which version of Solr are you using?
Maybe you can take a look at the below guide first if you haven't done so:
https://lucene.apache.org/solr/guide/7_4/common-query-parameters.html#fq-filter-query-parameter

Regards,
Edwin

On Wed, 5 Sep 2018 at 21:17, shruti suri  wrote:

> Hi,
>
> 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.
>
> 
> 
> explicit
> 1
> 10
> edismax
> name title author key
> *:*
> *
> 
> 
> apix
> * -author -key
> 
> 
>
>
>
> -
> Regards
> Shruti
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>