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 Naveen Pajjuri <pa...@myntra.com> on 2016/08/02 11:16:07 UTC

custom field types in solr 6.1.0

Hi,
Im trying to move from 4.10.4 to 6.1.0.
I want to define and use custom field types. but i read that its not
advisable to modify managed-schema file. how do i create custom field types
??

Thanks in advance,
Naveen Reddy

Re: custom field types in solr 6.1.0

Posted by Shawn Heisey <ap...@elyograg.org>.
On 8/2/2016 5:16 AM, Naveen Pajjuri wrote:
> Hi, Im trying to move from 4.10.4 to 6.1.0. I want to define and use
> custom field types. but i read that its not advisable to modify
> managed-schema file. how do i create custom field types ??

You have three choices.

* Ignore the warning and edit managed-schema, then reload/restart as
necessary.
* Use the Schema API to change the schema with HTTP requests.
* Switch to the classic schema, and use schema.xml instead of
managed-schema.

I personally would go with the first option.  The only reason that the
warning exists is that hand-edits of the file may be lost in certain
circumstances when also using the Schema API.  If you never use the
Schema API, you never need to worry about that.

Info about the Schema API:

https://cwiki.apache.org/confluence/display/solr/Schema+API

I think the warning in managed-schema should be changed to let people
know that if they never use the Schema API, it is perfectly safe to edit
the file.

Thanks,
Shawn


Re: custom field types in solr 6.1.0

Posted by Kais Hassan <ka...@gmail.com>.
Hello Naveen,

There is not against using custom types, actually to provide a good
search experience you will need to create your own custom types.

You can use the Classic schema.xml in Solr 6

read the following

https://cwiki.apache.org/confluence/display/solr/Schema+Factory+Definition+in+SolrConfig

And make sure to put

schemaFactory class="ClassicIndexSchemaFactory"

in your  solrconfig.xml
-- 
Best regards,
Kais

On 2 August 2016 at 14:16, Naveen Pajjuri <pa...@myntra.com> wrote:
> Hi,
> Im trying to move from 4.10.4 to 6.1.0.
> I want to define and use custom field types. but i read that its not
> advisable to modify managed-schema file. how do i create custom field types
> ??
>
> Thanks in advance,
> Naveen Reddy



-- 
Best regards,
Kais Hassan