lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich Mayring <>
Subject Re: AW: Analyzers, Queries: three questions
Date Wed, 11 Jun 2003 11:35:49 GMT
Karsten Konrad wrote:
> 2) How can I pass the value of a field through an Analyzer before 
> storing it?
> A text field is automatically analyzed and tokenized by the given
> analyzer, you do not have to do it "manually".

Well, but if I browse my index I see all the terms stored in the 
original form. I use this code:

doc.add(Field.Text("title","Workers HowTo");
// Build and execute Query, so that only the above document is found
Document d = hits.doc(0);
Field field = d.get("title");
System.out.println( + "," + field.stringValue());

This outputs "title,Workers HowTo" - the untokenized, unanalyzed form.

So, what's wrong here?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message