Hi I have a lot of data that is in a TEXT flat file which are numbers
does
anyone have a good suggestion for indexing TEXT numbers (zip codes,
other codes, dollar amounts, quantities, etc). since Lucene and other
indexers are really optimized for Alpha character indexing. What
approaches are typically taken in computer science for example to index
text numbers..hash maps or something else ??
Thank you,
Jack
Roedy Green - 31 Mar 2006 18:50 GMT
>anyone have a good suggestion for indexing TEXT numbers (zip codes,
>other codes, dollar amounts, quantities, etc)
You can convert them the Integers or Longs and use HashMaps or
TreeMaps. You could invent a specialised map that used primitives
rather than objects
For dense number, you can use an array lookup.
For Postal codes, V8V 2Y5 you can treat them as mixed base numbers and
translate them to binary.
You can feed them to an SQL database and let it worry about it.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.