Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR:unknown field '..'

Tags:

solr

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.

like image 781
Blanca Hdez Avatar asked Aug 27 '10 14:08

Blanca Hdez


People also ask

How to fix MySQL unknown column in field list error?

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.

How to fix “user_name column is unknown” error in SQL?

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.

What is LogLog “unknown field[ {}]” ClassName?

Log “unknown field [ {}]”classname is DecayFunctionBuilder.java We extracted the following from Elasticsearch source code for those seeking an in-depth context :

Does Solr log error say a field isn't defined?

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.


2 Answers

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.

like image 84
Nick Zadrozny Avatar answered Nov 10 '22 01:11

Nick Zadrozny


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 ;) )

like image 20
fatimazahramoussaid Avatar answered Nov 10 '22 01:11

fatimazahramoussaid