lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lochschmied, Alexander" <Alexander.Lochschm...@vishay.com>
Subject Special suggestions requirement
Date Thu, 02 Aug 2012 01:58:29 GMT
Is there a way to offer distinct, alphabetically sorted, fixed length options?

I am trying to suggest part numbers and I'm currently trying to do it with the spellchecker
component.
Let's say "ABCD" was entered and we have indexed part numbers like
ABCD00000000
ABCD20000000
ABCD21000000
ABCD22000000
...

I would like to have 2 characters suggested always, so for "ABCD", it should suggest
ABCD00
ABCD20
ABCD21
ABCD22
...

No smart sorting is needed, just alphabetically sorting. The problem is that for example 00
(or ABCD00) may not be suggested currently as it doesn't score high enough. But we are really
trying to get all distinct values starting from the smallest (up to a certain number of suggestions).

I was looking already at custom comparator class option. But this would probably not work
as I would need more information to implement it there (like at least the currently entered
search term, "ABCD" in the example).

Thanks,
Alexander

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message