We are working on ASP.NET MVC3 C# with SolrNet 3.6.
We have used dynamic fields.Solr index has been created successfully with appropriate data and it is working perfectly in Solr Admin as well as in our application also without dynamic fields.
We have retrieved all static fields like Id,Name etc using QueryOption and all that.
But We don’t know how to retrieve dynamic fields?
So please suggest us how to retrieve it?
Accessing Dynamic fields with SolrNet is pretty straight forward. Here is an example of mapping a set of dynamic string fields:
The following field is defined in the schema.xml
Then let’s assume that you have indexed documents with the following fields:
You would then add the following property to your C# class:
Then once you have queried Solr and have an IndexItem class, you can access the dynamic data fields like this:
Hopefully this will help you get dynamic fields working in your code…