Hi,
I am trying to search from an idlist (string containing comma seperated
numeric values)
eg:
QueryParser vParser = new QueryParser("idlist", new AlphanumAnalyzer()); //
analyzer using custom lettertokenizer which tokenize nuber also. class is
given below.
Query q = vParser.parse("55"); // example
now even if the field idlist contains say (44, 55, 66)
my search returns 0 hit. is there any alternative solution or is there some
problem with wat i am using.
Thanks in advance.
public class AlphanumericTokenizer extends LetterTokenizer {
public AlphanumericTokenizer(Reader reader) {
super(reader);
}
protected boolean isTokenChar(char c) {
return super.isTokenChar(c) || Character.isDigit(c);
}
}