Subject RE: [firebird-support] Hypothetical near-match search
Author Nigel Weeks
> The second phase will be some kind of interface that will
> show the appropriate record (for example an invoce form, or a
> customer edit form, or something that will let the users see
> the real data), this way you don't need to make a join to the
> real table.

Good thinking! When they drill in on the results, it's than that the real
record is obtained!


>
> The problems:
> 1.) You will have to make an automation facility to generate triggers
> (inser/update/delete) for each monitored table, that will
> split the record information into "words" and classify put
> this data on the Word-Index table.

Crontab and a small PHP script - it's about 40 lines of code.

> 2.) You will need some way to classify (score, relevance,
> etc.) the search result.

Hmm. Relevance...Possible a Levenstein distance between the search term, and
resultant words?...

> 3.) You will need to create a kind of plug-in that could be
> extended for new kinds of records (new tables) when it is
> created on the DB

The PHP gets a list of non-rdb$ tables, so it'll automatically index new
tables

> 4.) Besides Soundex and Metaphone, I think a kind of synonym
> table should be created too, for example if a user search for
> index the words indexes, indices, key, keys, etc. should be
> treated as similar.

I'll leave this for last - lots of time researching synonyms...

>
> I developed a kind of knowledge base that is in beta
> (internal use only) for techinical articles. I think it's
> working like a charm, but it's really simple and limited yet,
> and it has a fixed structure, no new tables are added, and
> just a small number of tables are monitored. To make it
> dinamic and even more better easily expanded, you will need
> some tools to help you and generate triggers code for you.

I'd like to know more about that! Got any references?

>
> Did you have looked at Lucene (http://lucene.apache.org/java/docs/) ?
> Maybe it is just what I, you and a lot of people are looking for...
> Didn't looked deep into it, don't know how it could be
> integrated with FB.
>

Shall have a gander.

Thanks!

Nige.