While working with Solr, I get this error:
ERROR:unknown field 'name'
But, I have defined this field in my schema.xml :
<field name="name" type="string" indexed="false"
stored="true" required="true" elementForm="INPUTHIDDEN" />
I get this error when I try to add the field to the documment which is going to be commited:
doc.addField("name", getName());
solrClient.addDocument(doc);
Any ideas? Thanks in advance.
Finally, the error can also be caused by invisible characters lurking in your script that can’t be seen when you copy and paste it from other sources. The only way to remove invisible characters is by rewriting the statements manually. The tutorial above has listed the most common cause for MySQL unknown column in field list error.
Let’s start with the SELECT statement. To fix the error in your SELECT statement, you need to make sure that the column (s) you specified in your SQL statement actually exists in your database table. Because the error above says that user_name column is unknown, let’s check the users table and see if the column exists or not.
Log “unknown field [ {}]”classname is DecayFunctionBuilder.java We extracted the following from Elasticsearch source code for those seeking an in-depth context :
This looks like the schema.xml doesn't have all of the fields defined. the SOLR log error says that a field isn't defined. I would make sure your your schema.xml is correct.
If you want to verify your index configuration within Solr, you can use the /admin/luke
handler commonly defined in the solrconfig.xml. The output will give you information about the fields that are defined in the schema that Solr has loaded.
If you don't see your name
field in there, you should double check that you've updated your schema.xml in the correct location for your index, and that the appropriate Solr core (or Solr itself) has since been restarted to load the changes.
i had the same issue, and i found a solution
i did this i got the error unknown field so i looked up in the schema of solr (schema.xml) and i found
i used store that is specified in the schema. you do the same. you should look for a field declared the same way as yours or use commands to add your field ( i don't know very much these, but you gonna find it ;) )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With