I have following scenario
There are different users who can access documents from engine.
User's will be able to access documents excluding some states (excluding restricted states for each type of users) .
Show respected state facet/filters to users
Example : Consider there are 2 users
User-1 : restricted states ['California']
User-2 : restricted states ['Texas', 'Florida']
* If User-1 logged in he can see all states documents except 'California'
* Facets will show all states in filters except 'California'
* For User-2 : show documents excluding state 'Texas' and 'Florida'
* Facets will show all states in filters except 'Texas', 'Florida'
What I want is ,
consider I have states array : ['Texas', 'Florida'] and I want to show all documents from engine excluding these two states.
so the result will return all documents where field state not equal to 'Texas' or 'Florida'
That would apply the filter globally, for all users, on every query. This would not apply it at the user level, like you mentioned in your original post.
** NOTE: I realized just now that this doesn't work correctly when you have the disjunctive facet flag set for states. I will need to enter a bug for this. If you want to see it working you'll need to remove states from "disjunctiveFacets" for now **
@JasonStoltz thanks , yes now its showing result according to filters config.
If I remove state from disjunctiveFacets, its just removing that state from facets
if I add filters (none) in searchQuery and remove state from disjunctiveFacets then its showing correct UI but after that not able to filter result on facet selection.
Right now don't want user level restriction. Its just a document field level restriction as done through filters config (using type none). Thanks its working !
Facets are not working when using these filters in searchQuery. could you please suggest me the way to work this ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.