Multiple Faceting with OR operation

105 views
Skip to first unread message

Pramod Bharadwaj C

unread,
Jul 28, 2015, 3:37:25 AM7/28/15
to ajax-solr
Hi. I am trying to filter using multiple values in the tagcloud from the demo site. I am trying to figure out how to implement an OR operation among them. For example, i have a keyword tag cloud with many keywords say china, india, war, nuclear, politics, government. When i try to filter by multiple selections like China and India. I want the docs to display having either china or india. basically i want it to happen like CHINA or INDIA, and not CHINA and INDIA. Please help me on this.

Sam Hakim

unread,
Dec 11, 2015, 3:47:44 PM12/11/15
to ajax-solr
Hello,

I have a similar question.

How can one filter based on multiple values?  For example if there's a list of folders, I need to display results that match Folder1 OR Folder2 OR Folder3, etc. 

Thus, I have a list of folders in 'list_of_folders' = ['Folder1', 'Folder2', 'Folder3'].

And trying to work with a code similar to:

Manager.store.addByValue('fq', 'folders:[list_of_folders]');

Thanks

Andrew Smith

unread,
Jan 29, 2016, 12:37:17 PM1/29/16
to ajax-solr
Hi,

I actually developed some extensions to Ajax-Solr that would seem to do what you want. I just released it on Github here:


In particular, I developed a new widget called MultiSelectWidget, which allows OR queries (in addition it replaces tag clouds with sorted checkboxes like you see on e-commerce sites like Amazon, Walmart, etc., as well as some other features). I also added a range query widget, and an update to ResultWidget to display highlighting snippets. Hope you find it useful.

-Andrew


On Tuesday, July 28, 2015 at 3:37:25 AM UTC-4, Pramod Bharadwaj C wrote:
Reply all
Reply to author
Forward
0 new messages