Indexing techniques

Hello everyoneThis is my first post in this forums. I want to implement some indexing techniques. I don't know how to start indexing. Can anyone give me an idea how to start it or a sample code will be appreciated.Thanks in advance
[267 byte] By [krivina] at [2007-10-2 19:17:11]
# 1

Did you wake up this morning and say, "Gee, I need to start indexing"? ;-)

Is there something specific you are trying to index? Your query is so open-ended its difficult to provide an answer. If you provide more information about what your doing, someone may be able to give specific guidance.

RadcliffePikea at 2007-7-13 20:59:22 > top of Java-index,Other Topics,Algorithms...
# 2

I your key is a String and your value a String, this works as an index

public class MyIndex{

HashMap map;

...

public void add(String key, String value){

map.put(key,value);

}

public String get(String key){

return (String)map.get(key);

}

public void save(File f){

//write map which implements Serializable (see http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html)

}

public void load(File f){

//read map which implements Serializable

}

}

Gil

gilroittoa at 2007-7-13 20:59:22 > top of Java-index,Other Topics,Algorithms...