lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich Mayring <u...@denic.de>
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.name() + "," + field.stringValue());

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

So, what's wrong here?

cheers,

Ulrich



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message