6

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">
    <str>11111111111111111111111111111111</str>
    <str>0de95ae441ab4d019eb067441b7c2450</str>
    <str>3156c74fd8334b8f86815a17ebe69998</str>
    <str>05e49a575ece46e98b73ce7f3fedc78d</str>
    <str>fd17e8226ec8435ea522d32f986bb8e1</str>
    <str>f9ce8111622a45e0b9cf2f88ea627c06</str>
    <str>c7f77608398e457297890077a5500c73</str>
</arr>

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

3
  • 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
    Commented Oct 3, 2016 at 21:00
  • @Laver- I never thought of it this way. Should I not pre-define the sitecore built in fields?
    – jdylanmc
    Commented Oct 5, 2016 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
    Commented Oct 10, 2016 at 14:12

1 Answer 1

4

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

2
  • Yep, it is already set that way. It only works when I omit the entire <field /> though.
    – jdylanmc
    Commented Oct 5, 2016 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. Commented Oct 20, 2016 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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