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 Zheng Lin Edwin Yeo <ed...@gmail.com> on 2017/04/28 04:06:04 UTC

Empty value fields not indexed

Hi,

I'm using Solr 6.4.2, and I realized that for those fields which has no
values, the field name is not index into Solr.

It was working fine in the previous version.

Any reason for this or any settings which needs to be done so that the
field name can be indexed even though it's value is empty?

Regards,
Edwin

Re: Empty value fields not indexed

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi Shawn,

Thanks for the info.

Regards,
Edwin

On 28 April 2017 at 20:36, Shawn Heisey <ap...@elyograg.org> wrote:

> On 4/27/2017 10:06 PM, Zheng Lin Edwin Yeo wrote:
> > I'm using Solr 6.4.2, and I realized that for those fields which has no
> > values, the field name is not index into Solr.
> >
> > It was working fine in the previous version.
> >
> > Any reason for this or any settings which needs to be done so that the
> > field name can be indexed even though it's value is empty?
>
> The example configs in newer versions that use "schemaless" mode, which
> include basic_configs and data_driven_schema_configs, include an update
> processor that removes fields with a blank value.
>
> If you remove this line from solrconfig.xml, it should cure that problem:
>
>     <processor class="solr.RemoveBlankFieldUpdateProcessorFactory"/>
>
> If it were me, I would completely remove all references to
> "add-unknown-fields-to-the-schema", or use sample_techproducts_configs
> as the starting point for my configuration, because it doesn't have that
> update processor.
>
> Thanks,
> Shawn
>
>

Re: Empty value fields not indexed

Posted by Shawn Heisey <ap...@elyograg.org>.
On 4/27/2017 10:06 PM, Zheng Lin Edwin Yeo wrote:
> I'm using Solr 6.4.2, and I realized that for those fields which has no
> values, the field name is not index into Solr.
>
> It was working fine in the previous version.
>
> Any reason for this or any settings which needs to be done so that the
> field name can be indexed even though it's value is empty?

The example configs in newer versions that use "schemaless" mode, which
include basic_configs and data_driven_schema_configs, include an update
processor that removes fields with a blank value.

If you remove this line from solrconfig.xml, it should cure that problem:

    <processor class="solr.RemoveBlankFieldUpdateProcessorFactory"/>

If it were me, I would completely remove all references to
"add-unknown-fields-to-the-schema", or use sample_techproducts_configs
as the starting point for my configuration, because it doesn't have that
update processor.

Thanks,
Shawn