If you do that, you enumerate every terms!!!
If you use a alphabeticaly sorted collection, you can stop, when
match stop, but, you have to test every terms before matching.
Lucene gives you tools to match begining of a term, just use it!!
M.
Le 8 juin 07 à 14:57, Patrick Turcotte a écrit :
Hi,
What we did was this:
1) When you application starts, it scans the index for terms values
and
store them in a map or something.
2) When you receive "ajax requests", you compare with the map data and
return the relevant part. Works quite fast for us, without round trips
to Lucene.
Patrick
Chris Lu wrote:
Hi,
I would like to implement an AJAX search. Basically when user
types in
several characters, I will try to search the Lucene index and found
all possible matching items.
Seems I need to use wildcard query like "test*" to matching anything.
Is this the only way to do it? It doesn't seems quite efficient,
especially when you just typed in the first character.
I guess the "good" way is to go through the terms, and return as soon
as, for example, 10 terms are found.
I am wondering is there anything like this already built?
--
Patrick Turcotte
Analyste
Projet Franqus : http://franqus.usherbrooke.ca
----------------------------------------------
[EMAIL PROTECTED]
(819) 821-8000, poste 63234
1-800-267-8337 puis 63234
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]