I have been tweaking my SOLR 5.4 schema and I have noticed this behavior:

If I have _path defined in my schema.xml, I do not see _path_sm (or _path) in my raw SOLR index. However, if I remove the _path definition from my schema.xml, then I correctly see _path_sm in my index.

The offending field is:

<field name="_path" type="string" indexed="true" stored="true" multiValued="true" />

And the field looks like this in SOLR:

<arr name="_path_sm">

Has anyone else noticed this behavior? Is there an elegant solution (besides just removing the field from my schema)?

  • 2
    Do you have more context as to why you're trying to add a specific definition for "_path"? Feels like you're running into some functionality related to the dynamicfields defined later in the schema. – Laver Oct 3 '16 at 21:00
  • @Laver- I never thought of it this way. Should I not pre-define the sitecore built in fields? – Dylan McCurry Oct 5 '16 at 18:10
  • 1
    This would require further investigation. I didn't submit an answer as it was just conjecture. The field named _path_sm will be based on the *_sm DynamicField, Sitecore is using this field to store a field named "_path" that requires a multi-valued string format, so it uses the pre-defined DynamicField. I'm assuming that somewhere within the indexing process Sitecore or Lucene is noticing that an _path field already exists in the Schema and is trying to insert it's data into your field. – Laver Oct 10 '16 at 14:12

Please, verify that your attribute "stored" is set to true:

<field name="_path" type="string" indexed="true" stored="true" multiValued="true" />

I had the behavior you mentioned when the stored attribute was set to false. Check you have that value set on all schemas

| improve this answer | |
  • Yep, it is already set that way. It only works when I omit the entire <field /> though. – Dylan McCurry Oct 5 '16 at 18:10
  • You'll need to rebuild the index after changing this value to force the field to recrawl as a stored field rather than an unstored field. – Chris Sulham Oct 20 '16 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.