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 Selvam <s....@gmail.com> on 2016/09/22 05:46:00 UTC

Removing SOLR fields from schema

Hi,

We use SOLR 5.x in cloud mode and have huge set of fields. We now want to
remove some 50 fields from Index/schema itself so that indexing & querying
will be faster. Is there a way to do that without losing existing data on
other fields? We don't want to do full re-indexing.


-- 
Regards,
Selvam

Re: Removing SOLR fields from schema

Posted by Selvam <s....@gmail.com>.
Hi,

Thanks Shawn and Erick, that helps me.

On Thu, Sep 22, 2016 at 8:26 PM, Erick Erickson <er...@gmail.com>
wrote:

> Not only will optimize not help, even re-indexing all
> the docs to the current collection will leave the
> meta-data in the index about the removed fields. For
> 50 fields that likely won't matter.
>
> As Shawn says, though, re-indexing from scratch
> (and I'd use a new collection) is best if at all possible.
>
> Best,
> Erick
>
> On Thu, Sep 22, 2016 at 6:29 AM, Shawn Heisey <ap...@elyograg.org> wrote:
> > On 9/22/2016 7:17 AM, David Santamauro wrote:
> >> Will an optimize remove those fields and corresponding data?
> > I am about 99 percent sure that an optimize will have no effect on
> > fields removed from the Solr schema.  The schema doesn't exist at the
> > Lucene level.  When you do an optimize, the entire operation is handled
> > by Lucene, using its forceMerge process.
> >
> > Thanks,
> > Shawn
> >
>



-- 
Regards,
Selvam
KnackForge <http://knackforge.com>

Re: Removing SOLR fields from schema

Posted by Erick Erickson <er...@gmail.com>.
Not only will optimize not help, even re-indexing all
the docs to the current collection will leave the
meta-data in the index about the removed fields. For
50 fields that likely won't matter.

As Shawn says, though, re-indexing from scratch
(and I'd use a new collection) is best if at all possible.

Best,
Erick

On Thu, Sep 22, 2016 at 6:29 AM, Shawn Heisey <ap...@elyograg.org> wrote:
> On 9/22/2016 7:17 AM, David Santamauro wrote:
>> Will an optimize remove those fields and corresponding data?
> I am about 99 percent sure that an optimize will have no effect on
> fields removed from the Solr schema.  The schema doesn't exist at the
> Lucene level.  When you do an optimize, the entire operation is handled
> by Lucene, using its forceMerge process.
>
> Thanks,
> Shawn
>

Re: Removing SOLR fields from schema

Posted by Shawn Heisey <ap...@elyograg.org>.
On 9/22/2016 7:17 AM, David Santamauro wrote:
> Will an optimize remove those fields and corresponding data?
I am about 99 percent sure that an optimize will have no effect on
fields removed from the Solr schema.  The schema doesn't exist at the
Lucene level.  When you do an optimize, the entire operation is handled
by Lucene, using its forceMerge process.

Thanks,
Shawn


Re: Removing SOLR fields from schema

Posted by David Santamauro <da...@gmail.com>.

On 09/22/2016 08:55 AM, Shawn Heisey wrote:
> On 9/21/2016 11:46 PM, Selvam wrote:
>> We use SOLR 5.x in cloud mode and have huge set of fields. We now want
>> to remove some 50 fields from Index/schema itself so that indexing &
>> querying will be faster. Is there a way to do that without losing
>> existing data on other fields? We don't want to do full re-indexing.
>
> When you remove fields from your schema, you can continue to use Solr
> with no problems even without a reindex.  But you won't see any benefit
> to your query performance until you DO reindex.  Until the reindex is
> done (ideally wiping the index first), all the data from the removed
> fields will remain in the index and affect your query speeds.

Will an optimize remove those fields and corresponding data?




Re: Removing SOLR fields from schema

Posted by Shawn Heisey <ap...@elyograg.org>.
On 9/21/2016 11:46 PM, Selvam wrote:
> We use SOLR 5.x in cloud mode and have huge set of fields. We now want
> to remove some 50 fields from Index/schema itself so that indexing &
> querying will be faster. Is there a way to do that without losing
> existing data on other fields? We don't want to do full re-indexing.

When you remove fields from your schema, you can continue to use Solr
with no problems even without a reindex.  But you won't see any benefit
to your query performance until you DO reindex.  Until the reindex is
done (ideally wiping the index first), all the data from the removed
fields will remain in the index and affect your query speeds.

Thanks,
Shawn