You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Girish Tavag <se...@gmail.com> on 2016/03/31 21:04:08 UTC

Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Hi,

I am new to solr, I started using this only from today,  when I wanted to
create dih, i'm getting the below error.

SolrException: fieldType 'booleans' not found in the schema

What does this mean? and How  to resolve this.

Regards,
GNT

Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Girish Tavag <se...@gmail.com>.
Hi Shawn and Jack,

 Yes that is true. I was referring the tutorial and practicing and ended up
in this.
By the way, one more thing I would like to know, is it possible to schedule
the full data import? or the delta import?
i.e. on regular intervals the data should be updated.

Regards,
GNT

On Sat, Apr 2, 2016 at 2:21 AM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 4/1/2016 1:24 PM, Girish Tavag wrote:
> >  Finally i'm able to figure out the problem. The issue was in
> > solrconfig.xml where the booleans was defined. I replaced booleans with
> > boolean and other similar fileds and it worked correctly :)
>
> This has happened because you mixed the solrconfig.xml file from
> data_driven_schema_configs with the schema from a completely different
> example.
>
> The config and schema in each example are intended to be used as a
> matched pair.  If you mix pieces from examples without checking to make
> sure they are compatible and fixing anything you find, problems *will*
> happen.
>
> Thanks,
> Shawn
>
>

Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Shawn Heisey <ap...@elyograg.org>.
On 4/1/2016 1:24 PM, Girish Tavag wrote:
>  Finally i'm able to figure out the problem. The issue was in
> solrconfig.xml where the booleans was defined. I replaced booleans with
> boolean and other similar fileds and it worked correctly :)

This has happened because you mixed the solrconfig.xml file from
data_driven_schema_configs with the schema from a completely different
example.

The config and schema in each example are intended to be used as a
matched pair.  If you mix pieces from examples without checking to make
sure they are compatible and fixing anything you find, problems *will*
happen.

Thanks,
Shawn


Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Jack Krupansky <ja...@gmail.com>.
I think it's a bug...

Ah, the key clue is here:
Caused by: org.apache.solr.common.SolrException: fieldType 'booleans' not
found in the schema
    at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessor
Factory$TypeMapping.populateValueClasses(AddSchemaFieldsUpdateProcessor
Factory.java:247)

In fact, if we look at this schema in the repo:
https://github.com/apache/lucene-solr/blob/releases/lucene-solr/5.5.0/solr/server/solr/configsets/data_driven_schema_configs/conf/solrconfig.xml

We can find this update processor chain:
<updateRequestProcessorChain name="add-unknown-fields-to-the-schema">

Which has this processor:

<processor class="solr.AddSchemaFieldsUpdateProcessorFactory"> <str
name="defaultFieldType">strings</str> <lst name="typeMapping"> <str
name="valueClass">java.lang.Boolean</str> <str
name="fieldType">booleans</str> </lst>

And there is you field type "booleans" reference.

That type used to be needed for multivalued boolean fields, but now the
dynamic pattern for *_bs is itself multivalued and simply references the
"boolean" type.

This schema in the repo has a similar issue:
https://github.com/apache/lucene-solr/blob/releases/lucene-solr/5.5.0/solr/example/files/conf/solrconfig.xml
<updateRequestProcessorChain name="files-update-processor">
<processor class="solr.AddSchemaFieldsUpdateProcessorFactory"> <str
name="defaultFieldType">strings</str> <lst name="typeMapping"> <str
name="valueClass">java.lang.Boolean</str> <str
name="fieldType">booleans</str> </lst>

Hmmm... or maybe the old "booleans" field type should be restored to allow
boolean fields to be multivalued?

So, somebody should file a Jira on this.


-- Jack Krupansky

On Fri, Apr 1, 2016 at 3:24 PM, Girish Tavag <se...@gmail.com>
wrote:

> Hi Shawn,
>
>  Finally i'm able to figure out the problem. The issue was in
> solrconfig.xml where the booleans was defined. I replaced booleans with
> boolean and other similar fileds and it worked correctly :)
>
> Regards,
> GNT.
>

Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Girish Tavag <se...@gmail.com>.
Hi Shawn,

 Finally i'm able to figure out the problem. The issue was in
solrconfig.xml where the booleans was defined. I replaced booleans with
boolean and other similar fileds and it worked correctly :)

Regards,
GNT.

Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Girish Tavag <se...@gmail.com>.
Hi Shawn,

 Thank you for responding and informing me about the attachments. Here is
the log file details..
016-04-01 18:24:08.191 INFO  (coreLoadExecutor-6-thread-1) [
x:myDatabase] o.a.s.c.CachingDirectoryFactory looking to close
<mypath>solr-5.5.0\server\solr\myDatabase\data\index
[CachedDir<<refCount=0;path=<mypath>solr-5.5.0\server\solr\myDatabase\data\index;done=false>>]
2016-04-01 18:24:08.192 INFO  (coreLoadExecutor-6-thread-1) [
x:myDatabase] o.a.s.c.CachingDirectoryFactory Closing directory:
<mypath>solr-5.5.0\server\solr\myDatabase\data\index
2016-04-01 18:24:08.192 INFO  (coreLoadExecutor-6-thread-1) [
x:myDatabase] o.a.s.c.CachingDirectoryFactory looking to close
<mypath>solr-5.5.0\server\solr\myDatabase\data
[CachedDir<<refCount=0;path=<mypath>solr-5.5.0\server\solr\myDatabase\data;done=false>>]
2016-04-01 18:24:08.192 INFO  (coreLoadExecutor-6-thread-1) [
x:myDatabase] o.a.s.c.CachingDirectoryFactory Closing directory:
<mypath>solr-5.5.0\server\solr\myDatabase\data
2016-04-01 18:24:08.193 ERROR (coreLoadExecutor-6-thread-1) [
x:myDatabase] o.a.s.c.CoreContainer Error creating core [myDatabase]:
fieldType 'booleans' not found in the schema
org.apache.solr.common.SolrException: fieldType 'booleans' not found in the
schema
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:820)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:658)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:814)
    at org.apache.solr.core.CoreContainer.access$000(CoreContainer.java:87)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:467)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:458)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:231)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.common.SolrException: fieldType 'booleans' not
found in the schema
    at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$TypeMapping.populateValueClasses(AddSchemaFieldsUpdateProcessorFactory.java:247)
    at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory.inform(AddSchemaFieldsUpdateProcessorFactory.java:173)
    at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:697)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:800)
    ... 10 more
2016-04-01 18:24:08.196 ERROR (coreContainerWorkExecutor-2-thread-1) [   ]
o.a.s.c.CoreContainer Error waiting for SolrCore to be created
java.util.concurrent.ExecutionException:
org.apache.solr.common.SolrException: Unable to create core [myDatabase]
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.solr.core.CoreContainer$2.run(CoreContainer.java:496)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:231)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.common.SolrException: Unable to create core
[myDatabase]
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:828)
    at org.apache.solr.core.CoreContainer.access$000(CoreContainer.java:87)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:467)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:458)
    ... 5 more
Caused by: org.apache.solr.common.SolrException: fieldType 'booleans' not
found in the schema
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:820)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:658)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:814)
    ... 8 more
Caused by: org.apache.solr.common.SolrException: fieldType 'booleans' not
found in the schema
    at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$TypeMapping.populateValueClasses(AddSchemaFieldsUpdateProcessorFactory.java:247)
    at
org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory.inform(AddSchemaFieldsUpdateProcessorFactory.java:173)
    at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:697)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:800)
    ... 10 more
2016-04-01 18:24:10.176 INFO  (qtp7980742-15) [   ] o.a.s.s.HttpSolrCall
[admin] webapp=null path=/admin/info/system params={wt=json} status=0
QTime=3426
2016-04-01 18:24:17.394 INFO  (qtp7980742-15) [   ] o.a.s.s.HttpSolrCall
[admin] webapp=null path=/admin/cores
params={indexInfo=false&wt=json&_=1459535057377} status=0 QTime=2
2016-04-01 18:24:17.494 INFO  (qtp7980742-16) [   ] o.a.s.s.HttpSolrCall
[admin] webapp=null path=/admin/info/system
params={wt=json&_=1459535057440} status=0 QTime=41

Regards,
GNT

On Sat, Apr 2, 2016 at 12:01 AM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 4/1/2016 12:11 PM, Girish Tavag wrote:
> >  I copied schema.xml from solr-5.5.0\example\example-DIH\solr\db\conf\
> >   to  \solr-5.5.0\server\solr\myDatabase\conf\
> > I've attached the file too.
> >
> > @Shawn
> > The file does not have any field which defined as  <field
> > name="somefield" type="booleans" indexed="true" stored="true"/>
>
> You are correct, "booleans" does not show up in that file.
>
> Either the schema you sent is not the schema that's actually being used,
> or the error message that you sent is not a precise copy/paste of what
> you are seeing.  You may need to let us see the entire stacktrace for
> any error messages in your logfile, as well as several lines before and
> after each error.  If you can share the entire logfile, that would be
> helpful.
>
> FYI -- attaching files often does not work.  You got lucky -- typically
> such attachments do not make it to the list.
>
> Thanks,
> Shawn
>
>

Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Shawn Heisey <ap...@elyograg.org>.
On 4/1/2016 12:11 PM, Girish Tavag wrote:
>  I copied schema.xml from solr-5.5.0\example\example-DIH\solr\db\conf\
>   to  \solr-5.5.0\server\solr\myDatabase\conf\
> I've attached the file too.
>
> @Shawn
> The file does not have any field which defined as  <field
> name="somefield" type="booleans" indexed="true" stored="true"/>

You are correct, "booleans" does not show up in that file.

Either the schema you sent is not the schema that's actually being used,
or the error message that you sent is not a precise copy/paste of what
you are seeing.  You may need to let us see the entire stacktrace for
any error messages in your logfile, as well as several lines before and
after each error.  If you can share the entire logfile, that would be
helpful.

FYI -- attaching files often does not work.  You got lucky -- typically
such attachments do not make it to the list.

Thanks,
Shawn


Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Girish Tavag <se...@gmail.com>.
Here is the error message "*myDatabase:*
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
fieldType 'booleans' not found in the schema"

On Fri, Apr 1, 2016 at 11:41 PM, Girish Tavag <se...@gmail.com>
wrote:

> Hi Jack,
>
>  I copied schema.xml from solr-5.5.0\example\example-DIH\solr\db\conf\
> to  \solr-5.5.0\server\solr\myDatabase\conf\
> I've attached the file too.
>
> @Shawn
> The file does not have any field which defined as  <field name="somefield"
> type="booleans" indexed="true" stored="true"/>
>
>
> On Fri, Apr 1, 2016 at 9:13 AM, Jack Krupansky <ja...@gmail.com>
> wrote:
>
>> Exactly which file did you copy? Please give the specific directory.
>>
>> -- Jack Krupansky
>>
>> On Thu, Mar 31, 2016 at 3:24 PM, Girish Tavag <se...@gmail.com>
>> wrote:
>>
>> > Hi Binoy,
>> >
>> >  I copied the entire file schema.xml from the working example provided
>> by
>> > solr itself. Solr provided dih example i'm able to run successfully .How
>> > could this be a problem?
>> >
>> > On Fri, Apr 1, 2016 at 12:39 AM, Binoy Dalal <bi...@gmail.com>
>> > wrote:
>> >
>> > > Somewhere in your schema you've defined a field with type as
>> "booleans".
>> > > You should check if you've made a typo somewhere by adding that extra
>> s
>> > > after boolean.
>> > > Else if it is a separate field that you're looking to add, define a
>> new
>> > > fieldtype called booleans.
>> > >
>> > > All the info to help you with this can be found here:
>> > >
>> > >
>> >
>> https://cwiki.apache.org/confluence/display/solr/Documents,+Fields,+and+Schema+Design
>> > >
>> > > I higly recommend that you go through the documentation before
>> starting.
>> > >
>> > > On Fri, 1 Apr 2016, 00:34 Girish Tavag, <se...@gmail.com>
>> > wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > I am new to solr, I started using this only from today,  when I
>> wanted
>> > to
>> > > > create dih, i'm getting the below error.
>> > > >
>> > > > SolrException: fieldType 'booleans' not found in the schema
>> > > >
>> > > > What does this mean? and How  to resolve this.
>> > > >
>> > > > Regards,
>> > > > GNT
>> > > >
>> > > --
>> > > Regards,
>> > > Binoy Dalal
>> > >
>> >
>>
>
>

Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Girish Tavag <se...@gmail.com>.
Hi Jack,

 I copied schema.xml from solr-5.5.0\example\example-DIH\solr\db\conf\
to  \solr-5.5.0\server\solr\myDatabase\conf\
I've attached the file too.

@Shawn
The file does not have any field which defined as  <field name="somefield"
type="booleans" indexed="true" stored="true"/>


On Fri, Apr 1, 2016 at 9:13 AM, Jack Krupansky <ja...@gmail.com>
wrote:

> Exactly which file did you copy? Please give the specific directory.
>
> -- Jack Krupansky
>
> On Thu, Mar 31, 2016 at 3:24 PM, Girish Tavag <se...@gmail.com>
> wrote:
>
> > Hi Binoy,
> >
> >  I copied the entire file schema.xml from the working example provided by
> > solr itself. Solr provided dih example i'm able to run successfully .How
> > could this be a problem?
> >
> > On Fri, Apr 1, 2016 at 12:39 AM, Binoy Dalal <bi...@gmail.com>
> > wrote:
> >
> > > Somewhere in your schema you've defined a field with type as
> "booleans".
> > > You should check if you've made a typo somewhere by adding that extra s
> > > after boolean.
> > > Else if it is a separate field that you're looking to add, define a new
> > > fieldtype called booleans.
> > >
> > > All the info to help you with this can be found here:
> > >
> > >
> >
> https://cwiki.apache.org/confluence/display/solr/Documents,+Fields,+and+Schema+Design
> > >
> > > I higly recommend that you go through the documentation before
> starting.
> > >
> > > On Fri, 1 Apr 2016, 00:34 Girish Tavag, <se...@gmail.com>
> > wrote:
> > >
> > > > Hi,
> > > >
> > > > I am new to solr, I started using this only from today,  when I
> wanted
> > to
> > > > create dih, i'm getting the below error.
> > > >
> > > > SolrException: fieldType 'booleans' not found in the schema
> > > >
> > > > What does this mean? and How  to resolve this.
> > > >
> > > > Regards,
> > > > GNT
> > > >
> > > --
> > > Regards,
> > > Binoy Dalal
> > >
> >
>

Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Jack Krupansky <ja...@gmail.com>.
Exactly which file did you copy? Please give the specific directory.

-- Jack Krupansky

On Thu, Mar 31, 2016 at 3:24 PM, Girish Tavag <se...@gmail.com>
wrote:

> Hi Binoy,
>
>  I copied the entire file schema.xml from the working example provided by
> solr itself. Solr provided dih example i'm able to run successfully .How
> could this be a problem?
>
> On Fri, Apr 1, 2016 at 12:39 AM, Binoy Dalal <bi...@gmail.com>
> wrote:
>
> > Somewhere in your schema you've defined a field with type as "booleans".
> > You should check if you've made a typo somewhere by adding that extra s
> > after boolean.
> > Else if it is a separate field that you're looking to add, define a new
> > fieldtype called booleans.
> >
> > All the info to help you with this can be found here:
> >
> >
> https://cwiki.apache.org/confluence/display/solr/Documents,+Fields,+and+Schema+Design
> >
> > I higly recommend that you go through the documentation before starting.
> >
> > On Fri, 1 Apr 2016, 00:34 Girish Tavag, <se...@gmail.com>
> wrote:
> >
> > > Hi,
> > >
> > > I am new to solr, I started using this only from today,  when I wanted
> to
> > > create dih, i'm getting the below error.
> > >
> > > SolrException: fieldType 'booleans' not found in the schema
> > >
> > > What does this mean? and How  to resolve this.
> > >
> > > Regards,
> > > GNT
> > >
> > --
> > Regards,
> > Binoy Dalal
> >
>

Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/31/2016 1:24 PM, Girish Tavag wrote:
>  I copied the entire file schema.xml from the working example provided by
> solr itself. Solr provided dih example i'm able to run successfully .How
> could this be a problem?

This info is exactly the same as what Binoy told you, except that I am
including example config info.

In your schema, you've got at least one field definition that looks like
this -- with the type attribute set to "booleans":

   <field name="somefield" type="booleans" indexed="true" stored="true"/>

But you do NOT have a fieldType definition named "booleans" in your
schema, which would look something like this:

    <fieldType name="booleans" class="solr.BoolField"
sortMissingLast="true" omitNorms="true"/>

The example schemas included with Solr have a fieldType named
"boolean".  For this reason, if you were to simply replace "booleans"
with "boolean" in your schema, I think this problem will go away.

Note:  If you are running Solr in cloud mode, the active config will be
stored in the zookeeper database.  Editing the schema on the disk won't
be enough, you'll need to upload your changes to zookeeper.

Thanks,
Shawn


Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Girish Tavag <se...@gmail.com>.
Hi Binoy,

 I copied the entire file schema.xml from the working example provided by
solr itself. Solr provided dih example i'm able to run successfully .How
could this be a problem?

On Fri, Apr 1, 2016 at 12:39 AM, Binoy Dalal <bi...@gmail.com> wrote:

> Somewhere in your schema you've defined a field with type as "booleans".
> You should check if you've made a typo somewhere by adding that extra s
> after boolean.
> Else if it is a separate field that you're looking to add, define a new
> fieldtype called booleans.
>
> All the info to help you with this can be found here:
>
> https://cwiki.apache.org/confluence/display/solr/Documents,+Fields,+and+Schema+Design
>
> I higly recommend that you go through the documentation before starting.
>
> On Fri, 1 Apr 2016, 00:34 Girish Tavag, <se...@gmail.com> wrote:
>
> > Hi,
> >
> > I am new to solr, I started using this only from today,  when I wanted to
> > create dih, i'm getting the below error.
> >
> > SolrException: fieldType 'booleans' not found in the schema
> >
> > What does this mean? and How  to resolve this.
> >
> > Regards,
> > GNT
> >
> --
> Regards,
> Binoy Dalal
>

Re: Slor 5.5.0 : SolrException: fieldType 'booleans' not found in the schema

Posted by Binoy Dalal <bi...@gmail.com>.
Somewhere in your schema you've defined a field with type as "booleans".
You should check if you've made a typo somewhere by adding that extra s
after boolean.
Else if it is a separate field that you're looking to add, define a new
fieldtype called booleans.

All the info to help you with this can be found here:
https://cwiki.apache.org/confluence/display/solr/Documents,+Fields,+and+Schema+Design

I higly recommend that you go through the documentation before starting.

On Fri, 1 Apr 2016, 00:34 Girish Tavag, <se...@gmail.com> wrote:

> Hi,
>
> I am new to solr, I started using this only from today,  when I wanted to
> create dih, i'm getting the below error.
>
> SolrException: fieldType 'booleans' not found in the schema
>
> What does this mean? and How  to resolve this.
>
> Regards,
> GNT
>
-- 
Regards,
Binoy Dalal