[
https://issues.apache.org/jira/browse/LUCENE-4369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455134#comment-13455134
]
Stefan Trcek commented on LUCENE-4369:
--------------------------------------
Not just a rename and I don't know if it is viable:
The idea is: you start thinking about analyzing when adding fields
for some purpose, not when creating an IndexWriter. And the mode how to do it
is tightened to the field.
How about to dismiss the Analyzer in IndexWriter/Config
and add all analyzing information to Field, something like
new TextField(...) // as keyword
new TextField(..., Analyzer, AnalyzingMode) // analyzed
or better
new TextField(..., AnalyzingMode.AS_IS) // as keyword
new TextField(..., new AnalyzingMode(Analyzer, ...)) // analyzed
new TextField(..., AnalyzingMode.STANDARD) // sugar
Then in the public API for IndexWriter there may be no need to use
- PerFieldAnalyzerWrapper
- Field.Index.NO
- KeywordAnalyzer
This also answers the not so easy question why and how to construct a
(field aware) analyzer as a parameter for IndexWriter/Config.
> StringFields name is unintuitive and not helpful
> ------------------------------------------------
>
> Key: LUCENE-4369
> URL: https://issues.apache.org/jira/browse/LUCENE-4369
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Attachments: LUCENE-4369.patch
>
>
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]