Hi,

I have a field  containing "cities" and I'd like to sort the results based
on length percentage match.

Example:

Asuming I've got these cities in the index:

   london, south west london, londonderry, oxford

And I search for "london", I'd like to get a list sorted like this:

london                    (6/6, 100% match)
londonderry             (6/11, 54% match)
south west london   (6/17, 35% match)

I know Lucene uses a different scoring algorithm base on term frecuency and
inverse document frecuency (tf & idf) but in my specific example I need to
use this scoring strategy.

Can anyone give a clue or start point please?
Is there a better technology to perform this kind of search?

Thanks,

Alejandro

Reply via email to