[Chandler-dev] is a unified displayName a good thing?
vajda at osafoundation.org
Thu Mar 30 17:38:01 PST 2006
On Thu, 30 Mar 2006, Alec Flett wrote:
> This means that if you do a PyLucene search for "a" you'll get literally
> hundreds, if not thousands, of results, even if you only have "Welcome to
> Chandler" in your All collection. Now of course it is easy to filter out the
> items that don't derive from Note and only display them... but it seems like
> a lot of work to iterate 1000 items that we know will never be displayed just
> to get 1 result back.
This can be done without loading the 1000 items. I could even add the
item kind's uuid to the lucene document and filter the search by kind, if
> There are a few options that I can think of, and I'll indicate my preference
> 1) change the repository so PyLucene only indexes one particular type of
> Item... maybe a specific subclass or something.
You can re-define an attribute for a particular kind. For example, you could
re-define 'displayName' on Note to be indexed. You even use a little known
core schema feature to define a sub-attribute of 'displayName', of the same
name, that just overrides the 'indexed' property for the Note kind.
More information about the chandler-dev