lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Did you mean...
Date Mon, 16 Feb 2004 14:16:17 GMT
On Feb 16, 2004, at 7:59 AM, lucene@nitwit.de wrote:
> On Monday 16 February 2004 12:40, Erik Hatcher wrote:
>> On Feb 16, 2004, at 6:12 AM, lucene@nitwit.de wrote:
>>> String description = doc.getField("contents").stringValue();
>>
>> What is the value of description here?
>
> ? The value of the field "contents" :-) Long, plain text..

I'm asking for specifics because you listed a specific truncation 
problem.

>>> final java.io.Reader r = new StringReader(description);
>>> final TokenStream in = analyzer.tokenStream(r);
>>
>> And what analyzer are you using here?
>
> GermanAnalyzer (yes, "has", "had", etc. below is fictional but most 
> people
> here probably don't speak german...e.g. "automobile" may become 
> "automob" or
> something like this).

And thus the nature of the problem.  Try using the WhitespaceAnalyzer 
instead to see what you get.

	Erik

>
>>> But the result is the same, the words are actually truncated (instead
>>> of
>>> "has", "had", "have", etc. only "ha") :-(
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
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