Пример #1
0
        protected void Test(Action<PropertyMap<Sample>> setIndexMode, TermVectorMode expectedTermVectorMode)
        {
            setIndexMode(map.Property(x => x.Name));
            var mapper = GetMappingInfo("Name");

            Assert.That(mapper.TermVector, Is.EqualTo(expectedTermVectorMode));
        }
 public ReflectionFieldMapper(PropertyInfo propertyInfo, StoreMode store, IndexMode index, TermVectorMode termVector, TypeConverter converter, string fieldName, QueryParser.Operator defaultParserOperator, bool caseSensitive, Analyzer analyzer, float boost, bool nativeSort = false)
 {
     this.propertyInfo   = propertyInfo;
     this.propertyGetter = CreatePropertyGetter(propertyInfo);
     if (propertyInfo.CanWrite)
     {
         this.propertySetter = CreatePropertySetter(propertyInfo);
     }
     this.store                 = store;
     this.index                 = index;
     this.termVector            = termVector;
     this.converter             = converter;
     this.fieldName             = fieldName;
     this.defaultParserOperator = defaultParserOperator;
     this.caseSensitive         = caseSensitive;
     this.analyzer              = analyzer;
     this.boost                 = boost;
     this.nativeSort            = nativeSort;
 }
Пример #3
0
 public ReflectionFieldMapper(PropertyInfo propertyInfo, StoreMode store, IndexMode index, TermVectorMode termVector, TypeConverter converter, string fieldName, QueryParser.Operator defaultParserOperator, bool caseSensitive, Analyzer analyzer, float boost)
 {
     this.propertyInfo          = propertyInfo;
     this.store                 = store;
     this.index                 = index;
     this.termVector            = termVector;
     this.converter             = converter;
     this.fieldName             = fieldName;
     this.defaultParserOperator = defaultParserOperator;
     this.caseSensitive         = caseSensitive;
     this.analyzer              = analyzer;
     this.boost                 = boost;
 }
Пример #4
0
 public ReflectionFieldMapper(PropertyInfo propertyInfo, StoreMode store, IndexMode index, TermVectorMode termVector, TypeConverter converter, string fieldName, bool caseSensitive, Analyzer analyzer, float boost)
     : this(propertyInfo, store, index, termVector, converter, fieldName, QueryParser.Operator.OR, caseSensitive, analyzer, boost)
 {
 }
Пример #5
0
 public ReflectionFieldMapper(PropertyInfo propertyInfo, StoreMode store, IndexMode index, TermVectorMode termVector,
                              TypeConverter converter, string fieldName, bool caseSensitive, Analyzer analyzer)
     : this(propertyInfo, store, index, termVector, converter, fieldName, caseSensitive, analyzer, 1f)
 {
 }