using magma for autocompletion

Ross Boylan ross at biostat.ucsf.edu
Sun Nov 8 19:17:18 UTC 2009


I'm thinking of using magma for autocompletion, and this raises some
questions.

First, if I put the query in a separate smalltalk process and then kill
it before it completes (e.g., because there are new characters), can
this cause any harm?

Second, the typical scenario would be that one additional character is
typed.  What's the most efficient way to handle this using magma
indices?  I could simply give a new query, or I could query the results
of my previous query.

I assume that once I had more characters than the string index held I
would work strictly with the results of previous queries.

Third, I could use special search structures (e.g., TSTree from the
BTree package) oriented to this problem.  Would that be a good idea?
Should I persist those search trees?

At least initially I have c. 8,000 records to search.  However, each
record has multiple words, and ideally I would search for a match to any
of them.

I may eventually want to weight the matches, either by internal
criterion (e.g., a match on the first word is better than on later ones)
or external ones (e.g., how many times this item was selected recently).

I think there is stuff that will do this for the web, but I want a
regular application.  This is significantly different from the E or
OCompletions since I am not matching syntax; this is more like matching
names.

I'd appreciate any insights.

Thanks.
Ross Boylan



More information about the Magma mailing list