lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4369) StringFields name is unintuitive and not helpful
Date Tue, 11 Sep 2012 10:17:07 GMT


Robert Muir commented on LUCENE-4369:

Chris: well there is a lot more to convey than the old Field.Index.NOT_ANALYZED:

# text is treated as if it went thru keywordanalyzer
# term frequencies and positions are omitted
# length normalization and index-time boosts are disabled

The idea of "MatchOnly" is to describe that the field is really only useful for matching,
not searching. The other 2 things this Field does wrt scoring and index options become important
when someone adds multiple instances under the same name: I think its important to convey
that its still only 'matching' and they wont have real scoring here.

The problem I see with "StringField" as a name is that it doesn't hint at any of this. The
name can lead you to believe you should use it because you happen to have your content as
a Java String.

> StringFields name is unintuitive and not helpful
> ------------------------------------------------
>                 Key: LUCENE-4369
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
> There's a huge difference between TextField and StringField, StringField screws up scoring
and bypasses your Analyzer.
> (see java-user thread "Custom Analyzer Not Called When Indexing" as an example.)
> The name we use here is vital, otherwise people will get bad results.
> I think we should rename StringField to MatchOnlyField.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

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

View raw message