non-collection properties (string, decimal, etc) are created on solr as collection typeswith Attribute mapping
See original GitHub issueHi, i’m having some problems with Attribute Mapping.
My scenario is:
- Solr 5.2.1 hosted on ubuntu machine
- Project ASP.NET MVC
Following the documentation example, i created the model and insert test data.
public Product()
{
Id = Guid.NewGuid().ToString();
Manufacturer = "Sample Manufacturer";
Categories = new List<string> { "Category 1", "Category 2", "Category 3" };
Price = 100;
InStock = true;
Timestamp = DateTime.Now;
Weight = null;
}
and the document are created as:
"docs": [{
"id": "05e77caa-5d54-4f8f-b3c5-5eac14579f4e",
"manu_exact": [
"Sample Manufacturer"
],
"cat": [
"Category 1",
"Category 2",
"Category 3"
],
"price": [
100
],
"inStock": [
true
],
"timestamp": [
"2016-01-07T23:54:53.99Z"
],
"_version_": 1522761031815790600
}]
That causing problems when retrieve the data.
Object of type 'System.Collections.ArrayList' cannot be converted to type 'System.String'.
Can anyone help?
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Collection Management Commands
Defines the name of the configuration (which must already be stored in ZooKeeper) to use for this collection. If not provided, Solr will...
Read more >Field Types Included with Solr
The following table lists the field types that are available in Solr. The org.apache.solr.schema package includes all the classes listed in this table....
Read more >Collection Management Commands
A collection is a single logical index that uses a single Solr configuration file ... See the CREATE action section above for details...
Read more >Collections API | Apache Solr Reference Guide 6.6
The Collections API is used to enable you to create, remove, or reload collections, but in the context of SolrCloud you can also...
Read more >Collections API | Apache Solr Reference Guide 8.1
In the context of SolrCloud you can use it to create collections with a specific number of shards and replicas, move replicas or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

There’s a sample app in this repo: https://github.com/mausch/SolrNet/tree/master/SampleSolrApp And here’s the schema.xml it uses: https://github.com/mausch/SolrNet/blob/master/solr/solr/conf/schema.xml
I meet the same problem, but I can’t resolve it.
I use Win 10.
My Command to create solr like that :
solr create -c test_query -n basic_configs