-- Jack Sleight <
jack.sleight@...> wrote
(on Thursday, 05 June 2008, 07:40 PM +0100):
> I have an application with multiple modules, each of which contain very
> different kinds of data (eg. news and shop), and each would have their
> results displayed in different ways (although on one page, I want people
> to be able to search everything from one place). Is it best to maintain
> separate indexes for each module, then query them all when someone does
> a search, or is it best to store everything in one index, and then
> (somehow??) group the results into their relevant modules and display
> them that way?
I've done both approaches, actually. On the ZF site, we have multiple
indices -- primarily because we build one for the manual, and then
re-use the ones built by the various developer tools (wiki, issue
tracker, etc); site search then queries each individually and presents
segregated results.
I've also done search where all data is in the same index. To make this
work well, it's good to use a keyword that has unique values for each
"application". As an example, if you have a 'bug' application, you might
have a keyword 'model' that has values of 'issue' and 'comment' --
allowing you to search on _just_ issues or _just_ comments by adding a
'model:issue' or 'model:comment' phrase to the search query.
--
Matthew Weier O'Phinney
Software Architect |
matthew@...
Zend Framework |
http://framework.zend.com/