4

Yes, you can extract custom parameters from XmlNode of your field configuration: <field fieldName="mounting" templateFieldName="Mounting" returnType="stringCollection"> MyNamespace.MyComputedIndexField, MyAssembly </field> using System.Xml; using Sitecore.ContentSearch; using Sitecore.ContentSearch....


3

Instead of executing var results = context.GetQueryable<SearchResultItem>() .Where(x => (Convert.ToString(x.TemplateId).Equals(Constants.UnversionedImageTemplateId, StringComparison.InvariantCultureIgnoreCase) || Convert.ToString( x.TemplateId).Equals(Constants.Jpeg, StringComparison.InvariantCultureIgnoreCase)) Use // maybe Guid....


2

When the content search API resolves your Linq code to a Solr query, unless the field is a known named field, then Sitecore will attempt to correct any suffix on the IndexField attribute. This is how it solves the problem that Solr requires a defined schema, so Sitecore adds dynamic fields to the schema and uses the suffix to define the data type. _sm is ...


2

You should use Predicate builder to build your query. You will have something like: var predicate = PredicateBuilder.True<SearchResultItem>(); predicate = predicate.And<SearchResultItem>(i => i.TemplateId == [Template ID]); #Get items under specific node or Items from specific location in Sitecore – predicate = predicate....


1

This is an interesting issue and is somewhat related to another problem with the Asset Optimizer. In the ContentDelivery role SXA makes use of the "shell" site. When this is set to "core" the optimizer breaks. If you remove it then it creates an issue with search. Below is a patch I got working to support both features: <?xml version=&...


1

You wrote in your question that the value which is indexed is "myField_sm":["Low level;High level"], It doesn't look like indexing issue. I've never seen Sitecore or Solr adding ";" in document fields. This looks rather like the field is indexed directly from item field value rather than from your custom code. Try to use ...


Only top voted, non community-wiki answers of a minimum length are eligible