Пример #1
0
 public DefaultFacetQuerySerializer(ISolrQuerySerializer querySerializer, ISolrFieldSerializer fieldSerializer)
 {
     serializer = new AggregateFacetQuerySerializer(new ISolrFacetQuerySerializer[] {
         new SolrFacetQuerySerializer(querySerializer),
         new SolrFacetDateQuerySerializer(fieldSerializer),
         new SolrFacetFieldQuerySerializer(),
     });
 }
 public DefaultFacetQuerySerializer(ISolrQuerySerializer querySerializer, ISolrFieldSerializer fieldSerializer)
 {
     serializer = new AggregateFacetQuerySerializer(new ISolrFacetQuerySerializer[] {
         new SolrFacetQuerySerializer(querySerializer),
         new SolrFacetDateQuerySerializer(fieldSerializer),
         new SolrFacetFieldQuerySerializer(),
     });
 }
Пример #3
0
 public DefaultQuerySerializer(ISolrFieldSerializer fieldSerializer)
 {
     serializer = new AggregateQuerySerializer(new ISolrQuerySerializer[] {
         new QueryByFieldSerializer(),
         new LocalParamsSerializer(this),
         new BoostQuerySerializer(this),
         new HasValueQuerySerializer(this),
         new NotQuerySerializer(this),
         new QueryInListSerializer(this),
         new NullableDateTimeRangeQuerySerializer(fieldSerializer),
         new DateTimeRangeQuerySerializer(fieldSerializer),
         new RangeQuerySerializer(fieldSerializer),
         new MultipleCriteriaQuerySerializer(this),
         new SelfSerializingQuerySerializer(),
     });
 }
Пример #4
0
 public DefaultQuerySerializer(ISolrFieldSerializer fieldSerializer)
 {
     serializer = new AggregateQuerySerializer(new ISolrQuerySerializer[] {
         new QueryByFieldSerializer(),
         new LocalParamsSerializer(this),
         new BoostQuerySerializer(this),
         new HasValueQuerySerializer(this),
         new NotQuerySerializer(this),
         new QueryInListSerializer(this),
         new NullableDateTimeRangeQuerySerializer(fieldSerializer),
         new DateTimeRangeQuerySerializer(fieldSerializer),
         new RangeQuerySerializer(fieldSerializer),
         new MultipleCriteriaQuerySerializer(this),
         new SelfSerializingQuerySerializer(),
     });
 }
        internal static string SerializeToSolr(this object value, ISolrFieldSerializer serializer)
        {
            if (serializer == null)
            {
                throw new ArgumentNullException(nameof(serializer));
            }
            if (value == null)
            {
                return(null);
            }

            if (serializer.CanHandleType(value.GetType()))
            {
                return(serializer.Serialize(value).First().FieldValue);
            }

            throw new InvalidOperationException($"Unable to serialize '{value}'.");
        }
 public RangeQuerySerializer(ISolrFieldSerializer fieldSerializer) {
     this.fieldSerializer = fieldSerializer;
 }
Пример #7
0
 public RangeQuerySerializer(ISolrFieldSerializer fieldSerializer)
 {
     this.fieldSerializer = fieldSerializer;
 }
Пример #8
0
 public SolrFacetDateQuerySerializer(ISolrFieldSerializer fieldSerializer)
 {
     this.fieldSerializer = fieldSerializer;
 }
Пример #9
0
 public NullableDateTimeRangeQuerySerializer(ISolrFieldSerializer fieldSerializer)
 {
     this.fieldSerializer = fieldSerializer;
 }
Пример #10
0
 /// <summary>
 /// Wraps a <see cref="ISolrFieldSerializer"/> making it support the corresponding <see cref="Nullable{T}"/> type
 /// </summary>
 public NullableFieldSerializer(ISolrFieldSerializer serializer)
 {
     this.serializer = serializer;
 }
Пример #11
0
 public SolrDocumentSerializer(IReadOnlyMappingManager mappingManager, ISolrFieldSerializer fieldSerializer)
 {
     this.mappingManager  = mappingManager;
     this.fieldSerializer = fieldSerializer;
 }
 public GenericDictionaryFieldSerializer(ISolrFieldSerializer serializer) {
     this.serializer = serializer;
 }
Пример #13
0
 public NullableFieldSerializer(ISolrFieldSerializer serializer)
 {
     this.serializer = serializer;
 }
Пример #14
0
 public KeyValuePairSerializer(ISolrFieldSerializer defaultFieldSerializer)
 {
     _fieldSerializer = defaultFieldSerializer;
 }
Пример #15
0
 /// <summary>
 /// Serializes <see cref="SolrFacetIntervalQuery"/>
 /// </summary>
 public SolrFacetIntervalQuerySerializer(ISolrFieldSerializer fieldSerializer)
 {
     this.fieldSerializer = fieldSerializer;
 }
Пример #16
0
 public GenericDictionaryFieldSerializer(ISolrFieldSerializer serializer)
 {
     this.serializer = serializer;
 }
Пример #17
0
 /// <summary>
 ///   Serializes 1-dimensional collections
 /// </summary>
 public CollectionFieldSerializer(ISolrFieldSerializer valueSerializer)
 {
     this.valueSerializer = valueSerializer;
 }
 public CollectionFieldSerializer(ISolrFieldSerializer valueSerializer)
 {
     this.valueSerializer = valueSerializer;
 }
Пример #19
0
 public SolrDictionarySerializer(ISolrFieldSerializer serializer)
 {
     this.serializer = serializer;
 }