6

I'm busy creating a Crawler using FlatDataCrawler for custom non-sitecore data. Inserting the data into Solr works, but when i'm reading the data with SolrContentSearchManager my entities are inserted with null field values.

I debugged through Sitecore pdb's to find where Sitecore initializes my custom objects (inherited from IIndexable) when I use IProviderSearchContext (This is the CreateElementInstance method in the DefaultDocumentMapper class.)

My field values are available when I debug, but IIndexDocumentPropertyMapperObjectFactory is null so it would never insert these values in my object.

See here: In my configuration I use the same indexDocumentPropertyMapper configuration as the default Solr configuration.

enter image description here

  • Hi, can you provide more information? The code snippet above doesn't give me enough information. Can you post snippets of your crawler? Does it inherit from HierarchicalDataCrawler<T> or Crawler<T>? – Pete Navarra Sep 22 '16 at 20:57
  • Thanks for your response Mark. I have found the solution. – Roy Gerritse Sep 27 '16 at 9:40
2

Found the solution. I used fieldNameFormat="PREFIX_{0}" in my fieldMap. This way Sitecore couldn't map my object to the Solr object.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.