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 Maria Muslea <ma...@gmail.com> on 2017/04/17 22:40:44 UTC

field with stored="false" is still stored

Hi,


I just upgraded to SOLR 6.4.1 from SOLR 4.10, and am having trouble with
fields set as stored="false".


I edited solrconfig.xml according to the documentation, so I could edit the
schema using schema api.


<schemaFactory class="ManagedIndexSchemaFactory">
   <bool name="mutable">true</bool>
   <str name="managedSchemaResourceName">managed-schema</str>
 </schemaFactory>

I added a field using "Add Field" from the Schema GUI, and the field does
appear in managed-schema as:


<field name="concept" type="string" indexed="true" stored="false"/>


Once I add a document to SOLR I am able to retrieve this field even though
it is set to stored="false", which means that it is stored.


I found a comment suggesting to remove
AddSchemaFieldsUpdateProcessorFactory so the field isn't readded, but with
no success.


I would appreciate any help.

Thank you,
Maria

Re: field with stored="false" is still stored

Posted by Maria Muslea <ma...@gmail.com>.
Thank you for replying. While I did say "upgrade", I started with a "fresh"
copy of Solr 6.4.1, I did not try to import anything from Solr 4. Once I
saw that it isn't working as expected I only added one test document using
SolrJ:

SolrInputDocument p = new SolrInputDocument();

p.addField( "id", "id1");

p.addField( "concept", "stuff1");


Even though "concept" is set as stored="false" I can still retrieve it.


"response":{"numFound":1,"start":0,"docs":[ { "id":"id1", "concept":"stuff1",
"_version_":1564943864084561920}] }}



If you have any suggestions of what I could try I would really appreciate
it. Given what I described in my previous email is it possible that it is
not using managed-schema? Is there a why that I could see which schema it
is using?

Thank you,
Maria



On Mon, Apr 17, 2017 at 7:33 PM, Zheng Lin Edwin Yeo <ed...@gmail.com>
wrote:

> Hi Maria,
>
> From what you mentioned, you have upgraded directly from Solr 4 to Solr 6.
> If I'm not wrong, I don't think we can upgrade the index with a direct jump
> of 2 version.
>
> Was the field set to stored="false" before you upgrade?
>
> Regards,
> Edwin
>
>
>
> On 18 April 2017 at 06:40, Maria Muslea <ma...@gmail.com> wrote:
>
> > Hi,
> >
> >
> > I just upgraded to SOLR 6.4.1 from SOLR 4.10, and am having trouble with
> > fields set as stored="false".
> >
> >
> > I edited solrconfig.xml according to the documentation, so I could edit
> the
> > schema using schema api.
> >
> >
> > <schemaFactory class="ManagedIndexSchemaFactory">
> >    <bool name="mutable">true</bool>
> >    <str name="managedSchemaResourceName">managed-schema</str>
> >  </schemaFactory>
> >
> > I added a field using "Add Field" from the Schema GUI, and the field does
> > appear in managed-schema as:
> >
> >
> > <field name="concept" type="string" indexed="true" stored="false"/>
> >
> >
> > Once I add a document to SOLR I am able to retrieve this field even
> though
> > it is set to stored="false", which means that it is stored.
> >
> >
> > I found a comment suggesting to remove
> > AddSchemaFieldsUpdateProcessorFactory so the field isn't readded, but
> with
> > no success.
> >
> >
> > I would appreciate any help.
> >
> > Thank you,
> > Maria
> >
>

Re: field with stored="false" is still stored

Posted by Maria Muslea <ma...@gmail.com>.
One additional detail. In the Schema view the field appears as "unstored
field", which is what I want, but still it seems to be stored.

Thank you for your help.


Field: concept
Field-Type:org.apache.solr.schema.StrFieldDocs:1
<http://localhost:8983/solr/#/iss1/query?q=concept:[* TO *]>
Flags:IndexedDocValuesOmit NormsOmit Term Frequencies & PositionsSort
Missing Last
Properties √ √ √ √ √
Schema √ √ √ √ √
Index (unstored field)


On Mon, Apr 17, 2017 at 7:33 PM, Zheng Lin Edwin Yeo <ed...@gmail.com>
wrote:

> Hi Maria,
>
> From what you mentioned, you have upgraded directly from Solr 4 to Solr 6.
> If I'm not wrong, I don't think we can upgrade the index with a direct jump
> of 2 version.
>
> Was the field set to stored="false" before you upgrade?
>
> Regards,
> Edwin
>
>
>
> On 18 April 2017 at 06:40, Maria Muslea <ma...@gmail.com> wrote:
>
> > Hi,
> >
> >
> > I just upgraded to SOLR 6.4.1 from SOLR 4.10, and am having trouble with
> > fields set as stored="false".
> >
> >
> > I edited solrconfig.xml according to the documentation, so I could edit
> the
> > schema using schema api.
> >
> >
> > <schemaFactory class="ManagedIndexSchemaFactory">
> >    <bool name="mutable">true</bool>
> >    <str name="managedSchemaResourceName">managed-schema</str>
> >  </schemaFactory>
> >
> > I added a field using "Add Field" from the Schema GUI, and the field does
> > appear in managed-schema as:
> >
> >
> > <field name="concept" type="string" indexed="true" stored="false"/>
> >
> >
> > Once I add a document to SOLR I am able to retrieve this field even
> though
> > it is set to stored="false", which means that it is stored.
> >
> >
> > I found a comment suggesting to remove
> > AddSchemaFieldsUpdateProcessorFactory so the field isn't readded, but
> with
> > no success.
> >
> >
> > I would appreciate any help.
> >
> > Thank you,
> > Maria
> >
>

Re: field with stored="false" is still stored

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

From what you mentioned, you have upgraded directly from Solr 4 to Solr 6.
If I'm not wrong, I don't think we can upgrade the index with a direct jump
of 2 version.

Was the field set to stored="false" before you upgrade?

Regards,
Edwin



On 18 April 2017 at 06:40, Maria Muslea <ma...@gmail.com> wrote:

> Hi,
>
>
> I just upgraded to SOLR 6.4.1 from SOLR 4.10, and am having trouble with
> fields set as stored="false".
>
>
> I edited solrconfig.xml according to the documentation, so I could edit the
> schema using schema api.
>
>
> <schemaFactory class="ManagedIndexSchemaFactory">
>    <bool name="mutable">true</bool>
>    <str name="managedSchemaResourceName">managed-schema</str>
>  </schemaFactory>
>
> I added a field using "Add Field" from the Schema GUI, and the field does
> appear in managed-schema as:
>
>
> <field name="concept" type="string" indexed="true" stored="false"/>
>
>
> Once I add a document to SOLR I am able to retrieve this field even though
> it is set to stored="false", which means that it is stored.
>
>
> I found a comment suggesting to remove
> AddSchemaFieldsUpdateProcessorFactory so the field isn't readded, but with
> no success.
>
>
> I would appreciate any help.
>
> Thank you,
> Maria
>

Re: field with stored="false" is still stored

Posted by Maria Muslea <ma...@gmail.com>.
Thank you so much. This is the setting that I was missing. It is working as
expected now.

Maria

On Mon, Apr 17, 2017 at 8:10 PM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 4/17/2017 4:40 PM, Maria Muslea wrote:
> > I just upgraded to SOLR 6.4.1 from SOLR 4.10, and am having trouble with
> > fields set as stored="false".
> >
> > I edited solrconfig.xml according to the documentation, so I could edit
> the schema using schema api.
> >
> > <schemaFactory class="ManagedIndexSchemaFactory">
> >    <bool name="mutable">true</bool>
> >    <str name="managedSchemaResourceName">managed-schema</str>
> >  </schemaFactory>
> >
> > I added a field using "Add Field" from the Schema GUI, and the field
> does appear in managed-schema as:
> >
> > <field name="concept" type="string" indexed="true" stored="false"/>
>
> In newer versions of Solr, certain field classes have docValues enabled
> by default.  I think StrField is one of them.  I tried to look at the
> code to verify this, but was unable to figure it out on short notice.
>
> Fields with docValues enabled will show up in search results even if the
> field is not stored, unless you disable the
> |useDocValuesAsStored|setting on the field.
>
> Thanks,
> Shawn
>
>

Re: field with stored="false" is still stored

Posted by Shawn Heisey <ap...@elyograg.org>.
On 4/17/2017 4:40 PM, Maria Muslea wrote:
> I just upgraded to SOLR 6.4.1 from SOLR 4.10, and am having trouble with
> fields set as stored="false".
>
> I edited solrconfig.xml according to the documentation, so I could edit the schema using schema api.
>
> <schemaFactory class="ManagedIndexSchemaFactory">
>    <bool name="mutable">true</bool>
>    <str name="managedSchemaResourceName">managed-schema</str>
>  </schemaFactory>
>
> I added a field using "Add Field" from the Schema GUI, and the field does appear in managed-schema as:
>
> <field name="concept" type="string" indexed="true" stored="false"/>

In newer versions of Solr, certain field classes have docValues enabled
by default.  I think StrField is one of them.  I tried to look at the
code to verify this, but was unable to figure it out on short notice.

Fields with docValues enabled will show up in search results even if the
field is not stored, unless you disable the
|useDocValuesAsStored|setting on the field.

Thanks,
Shawn