GetOffsetGap() public method

Just like #getPositionIncrementGap, except for Token offsets instead. By default this returns 1. this method is only called if the field produced at least one token for indexing.
public GetOffsetGap ( string fieldName ) : int
fieldName string the field just indexed
return int
Exemplo n.º 1
0
        /// <summary> Return the offsetGap from the analyzer assigned to field </summary>
        public override int GetOffsetGap(Lucene.Net.Documents.Fieldable field)
        {
            Analyzer analyzer = (Analyzer)analyzerMap[field.Name()];

            if (analyzer == null)
            {
                analyzer = defaultAnalyzer;
            }
            return(analyzer.GetOffsetGap(field));
        }
Exemplo n.º 2
0
        /// <summary> Return the offsetGap from the analyzer assigned to field </summary>
        public override int GetOffsetGap(Documents.IFieldable field)
        {
            Analyzer analyzer = analyzerMap[field.Name] ?? defaultAnalyzer;

            return(analyzer.GetOffsetGap(field));
        }