Commit b96f4973 authored by rajeshsubhankar's avatar rajeshsubhankar Committed by Marc Gravell

Disable Stop-Words added (#754)

* Disable Stop-Words added

* DisableStopWords enum value updated
parent b78569f6
...@@ -34,7 +34,11 @@ public enum IndexOptions ...@@ -34,7 +34,11 @@ public enum IndexOptions
/// <summary> /// <summary>
/// The default indexing options - use term offsets and keep fields flags /// The default indexing options - use term offsets and keep fields flags
/// </summary> /// </summary>
Default = UseTermOffsets | KeepFieldFlags Default = UseTermOffsets | KeepFieldFlags ,
/// <summary>
/// If set, we will disable the Stop-Words completely
/// </summary>
DisableStopWords = 8
} }
private static void SerializeRedisArgs(IndexOptions flags, List<object> args) private static void SerializeRedisArgs(IndexOptions flags, List<object> args)
{ {
...@@ -50,6 +54,11 @@ private static void SerializeRedisArgs(IndexOptions flags, List<object> args) ...@@ -50,6 +54,11 @@ private static void SerializeRedisArgs(IndexOptions flags, List<object> args)
{ {
args.Add("NOSCOREIDX".Literal()); args.Add("NOSCOREIDX".Literal());
} }
if ((flags & IndexOptions.DisableStopWords) == IndexOptions.DisableStopWords)
{
args.Add("STOPWORDS".Literal());
args.Add(0);
}
} }
private readonly IDatabaseAsync _db; private readonly IDatabaseAsync _db;
private IDatabase DbSync private IDatabase DbSync
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment