jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ard Schrijvers <a.schrijv...@onehippo.com>
Subject Re: AutoCompelete
Date Thu, 25 Nov 2010 11:11:39 GMT
On Thu, Nov 25, 2010 at 11:46 AM, Alexander Klimetschek
<aklimets@adobe.com> wrote:
> On 25.11.10 11:00, "Ard Schrijvers" <a.schrijvers@onehippo.com> wrote:
>>Ah, you suggest to manually keep track of the 'auto-suggest' list,
>>right? Just read them all in once, have some observer for changes, et
>>voila. That works, but I wanted to build it differently myself
> I already implemented it like this. The things is that the use case will
> be that you don't want to automatically build this list from some generic
> full text search index. I thought about using the Lucene index of the
> repository as source for this as well. But it turns out that you always
> want to control what is displayed during the auto completion.

I would not use all the terms from the term enum, but only the terms
belonging to some (multivalued) property. For example


Perhaps this is what you actually meant in your first mail I now
realize. I only thought you would just fetch all the property values
by jcr calls, where I suggested to expose the Lucene term space (thus
probably only for some property the terms) as a hierarchical tree, for

  |- p
  |   |- e
  |   `- s

If you type, 'ap' the suggestions are 'ape' and 'aps'

> Otherwise, how do you select the ~10 items to show for 1, 2 or 3 letter
> inputs? You need some use-case-dependent priorities for each term, for
> example the popularity of those terms gathered from the search interface
> itself.

This info is pretty much in the Lucene term space: So, you can
retrieve all the terms for some property (tags property). How often
the terms are used is also present (popularity)

Regards Ard

> Regards,
> Alex
> --
> Alexander Klimetschek
> Developer // Adobe (Day) // Berlin - Basel

Europe  •  Amsterdam  Oosteinde 11  •  1017 WT Amsterdam  •  +31 (0)20 522 4466
USA  • San Francisco  185 H Street Suite B  •  Petaluma CA 94952-5100
•  +1 (707) 773 4646
Canada    •   Montréal  5369 Boulevard St-Laurent  •  Montréal QC H2T
1S5  •  +1 (514) 316 8966
www.onehippo.com  •  www.onehippo.org  •  info@onehippo.com

View raw message