[
https://issues.apache.org/jira/browse/LUCENENET-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13663805#comment-13663805
]
Phinehas commented on LUCENENET-523:
------------------------------------
I tried to remove all stop words by following coding:
{code}
Type t = StopAnalyzer.ENGLISH_STOP_WORDS_SET.GetType();
System.Reflection.PropertyInfo fi = t.GetProperty("IsReadOnly",
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.Public);
fi.SetValue(StopAnalyzer.ENGLISH_STOP_WORDS_SET, false, null);
StopAnalyzer.ENGLISH_STOP_WORDS_SET = CharArraySet.EMPTY_SET;
{code}
But the stop words still cannot be searched.
Is it possible to remove all stop words? I just only need Empty Set.
> StandardAnalyzer StopWords cannot be used
> -----------------------------------------
>
> Key: LUCENENET-523
> URL: https://issues.apache.org/jira/browse/LUCENENET-523
> Project: Lucene.Net
> Issue Type: Bug
> Reporter: Phinehas
>
> When set the stop words list to empty set, it stills stop the english stop
> words such as "of", "the". But I want to search these common words in phrase
> query.
> StandardAnalyzer analyzer = new StandardAnalyzer(Version.LUCENE_30,
> CharArraySet.EMPTY_SET);
> IndexSearcher searcher = new
> IndexSearcher(FSDirectory.Open(indexDirectory));
> Lucene.Net.Index.IndexReader indexReader =
> Lucene.Net.Index.IndexReader.Open(FSDirectory.Open(indexDirectory), true);
--
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