PDA

View Full Version : Search Filtering


TheFearow
September 25th, 2006, 10:27 PM
I am just wondering, what is the class that handles search results etc?

I am building a function to filter search results (like an extra search field saying where the title/whatever does NOT contain these words).


Thanks,
Matt

Sam
September 26th, 2006, 07:34 PM
There's a series of filters that the GUI uses to filter search results. The code is around gui/../search/ResultPanel. Specifically, take a look at the 'FILTER' variable, the CompositeFilter object, and the filterChanged method. The way these are used (and the classes that use them) should give some good insight into how to add another GUI filter.

But... to do this "the right way", it'd need to be in the core. The core would need to discard search results that shouldn't be shown (to keep dynamic querying in sync), and other clients would need to understand the query has a list of negative words and not send those in reply (which wastes bandwidth otherwise).