Generally, you will need to delete the index and completely reindex your
data if you change the type of a field.
I don't think that would account for active_cruise being an undefined field
though.
I did try your scenario with the Solr 4.2 example, and a field named
active_cruise, and it worked fine for me. The only issue was that existing
data (e.g., 1 in the int field) was all considered as boolean false after I
changed the schema and restarted.
-- Jack Krupansky
-----Original Message-----
From: Mid Night
Sent: Monday, March 25, 2013 6:30 AM
To: solr-user@lucene.apache.org
Subject: Re: Undefined field problem.
Further to the prev msg: Here's an extract from my current schema.xml:
<field name="show_en" type="boolean" indexed="true" stored="false"
required="true" />
<field name="active_cruise" type="boolean" indexed="true" stored="true"/>
<field name="non_grata" type="boolean" indexed="true" stored="true"/>
<field name="toptipp" type="int" indexed="true" stored="true"/>
The original schema.xml had the last 3 fields in the order toptipp,
active_cruise and non_grata. Active_cruise and non_grata were also defined
as type="int". I changed the order and field types in my attempts to fix
the error.
On 25 March 2013 11:21, Mid Night <mid...@gmail.com> wrote:
Hi,
I recently added a new field (toptipp) to an existing solr schema.xml and
it worked just fine. Subsequently I added to more fields (active_cruises
and non_grata) to the schema and now I get this error:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">400</int><int
name="QTime">6</int></lst><lst name="error"><str name="msg">undefined
field: "active_cruise"</str><int name="code">400</int></lst>
</response>
My solr db is populated via a program that creates and uploads a csv
file. When I view the csv file, the field "active_cruises" (given as
undefined above), is populated correctly. As far as I can tell, when I
added the final fields to the schema, I did exactly the same as when I
added "toptipp". I updated schema.xml and restarted solr (java -jar
start.jar).
I am really at a loss here. Can someone please help with the answer or by
pointing me in the right direction? Naturally I'd be happy to provide
further info if needed.
Thanks
MK