Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tobias Lopez 64 posts 210 karma points
    Nov 21, 2018 @ 13:11
    Tobias Lopez
    0

    Examine.AzureDirectory throws 'The valueDictionary is not formatted correctly' after installing

    I've just installed Examine.AzureDirectory and moved the files to azure cloud storage. Now I get an error when I get an image with Umbraco.TypedMedia(). When I use the MediaService it works.

    Am I missing a config or so?

    Code

    var media = Umbraco.TypedMedia(1210);
    

    Error Message

    The valueDictionary is not formatted correctly and is missing any of the  'nodeName,__nodeName' elements
    

    Versions

    • Umbraco: 7.12.3
    • Examine: 0.1.90-beta11
    • Examine.AzureDirectory: 1.0.0-beta07
    • UmbracoFileSystemProviders.Azure: 1.0.2
    • Lucene.Net: 2.9.4.1

    ExamineSettings.config

    <Examine>
      <ExamineIndexProviders>
        <providers>
          <add name="InternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
               supportUnpublished="true"
               supportProtected="true"
               analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"
               directoryFactory="Examine.AzureDirectory.AzureDirectoryFactory, Examine.AzureDirectory" />
    
          <add name="InternalMemberIndexer" type="UmbracoExamine.UmbracoMemberIndexer, UmbracoExamine"
               supportUnpublished="true"
               supportProtected="true"
               analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"
               directoryFactory="Examine.AzureDirectory.AzureDirectoryFactory, Examine.AzureDirectory" />
    
            <!-- default external indexer, which excludes protected and unpublished pages-->
            <add name="ExternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
                 directoryFactory="Examine.AzureDirectory.AzureDirectoryFactory, Examine.AzureDirectory" />
    
        </providers>
      </ExamineIndexProviders>
    
      <ExamineSearchProviders defaultProvider="ExternalSearcher">
        <providers>
          <add name="InternalSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
               analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net" />
    
          <add name="ExternalSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine" />
    
          <add name="InternalMemberSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
               analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" enableLeadingWildcard="true" />
    
        </providers>
      </ExamineSearchProviders>
    
    </Examine>
    

    ExamineIndex.config

    I didn't touch this file

    <ExamineLuceneIndexSets>
      <!-- The internal index set used by Umbraco back-office - DO NOT REMOVE -->
      <IndexSet SetName="InternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/Internal/"/>
    
      <!-- The internal index set used by Umbraco back-office for indexing members - DO NOT REMOVE -->
      <IndexSet SetName="InternalMemberIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/InternalMember/">
        <IndexAttributeFields>
          <add Name="id" />
          <add Name="nodeName"/>
          <add Name="updateDate" />
          <add Name="writerName" />
          <add Name="loginName" />
          <add Name="email" />
          <add Name="nodeTypeAlias" />
        </IndexAttributeFields>
      </IndexSet>
    
      <!-- Default Indexset for external searches, this indexes all fields on all types of nodes-->
      <IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
    </ExamineLuceneIndexSets>
    
  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    Nov 21, 2018 @ 13:22
    Shannon Deminick
    0

    (For reference, this is referring to this: https://github.com/Shazwazza/Examine/wiki/Examine-with-Azure-Directory-(Blob-Storage) )

    Seems odd. Works on my machine and has for a while now. Can you see that you have index files in your blob storage and that they are being updated when you rebuild?

  • Tobias Lopez 64 posts 210 karma points
    Nov 22, 2018 @ 10:41
    Tobias Lopez
    0

    Do you know where i could look into to pin point the issue?

  • Tobias Lopez 64 posts 210 karma points
    Nov 21, 2018 @ 13:46
    Tobias Lopez
    0

    yes, I see the files and the last modified date also changes when i rebuild.

    I also have the package UmbracoFileSystemProviders.Azure could this be a problem?

  • Tobias Lopez 64 posts 210 karma points
    Nov 22, 2018 @ 16:58
    Tobias Lopez
    0

    I've just installed Cogworks.ExamineInspector to inspect the cache.

    And it finds the media with the id i was searching for and even with the nodeName.

    enter image description here

    I tried to step through the umbraco source code and found that on this line the valueDictionary doenst have a value for nodeName or __nodeName.

    enter image description here

    Were could this field get lost?

  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    Nov 23, 2018 @ 03:25
    Shannon Deminick
    0

    I'd just have to wonder if that Examine index viewer is actually viewing the index in Blob storage or not (the path it's listing there isn't where indexes would be stored if the blob storage provider is in use). Your best bet is to download the blob storage files and look at them with Luke: http://www.getopt.org/luke/

  • Tobias Lopez 64 posts 210 karma points
    Dec 10, 2018 @ 11:02
    Tobias Lopez
    0

    I just downloaded the InternalIndexSet and opened it with luke. You are right, i dont see the __nodeName or nodeName.

    enter image description here

    can i somehow force the indexing of the missing fields?

  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    Nov 23, 2018 @ 03:31
  • Alan Mitchell 57 posts 279 karma points c-trib
    Nov 23, 2018 @ 12:26
    Alan Mitchell
    0

    I've spent the morning debugging a similar issue. Umbraco.TypedMedia was returning an incomplete set of data, which meant .Url() would return a blank string.

    ( For anyone stumbling across this thread it's worth pointing out that the TypedMedia() function and friends read data from the Examine Index defined as the InternalIndexSet .TypedContent() reads from the Umbraco.Config XML file to avoid hitting the database all the time, but Media uses the Examine index instead. This is why Media issues can turn into Examine issues. )

    Anyway, I'm in the process of moving to AzureBlogStorage for file storage and Examine, so I thought that was the issue. It was actually a huge distraction - the issue was that the data I needed from the index (specifically umbracoFile) was not in the InternalIndexSet because I had added a custom field under <IndexUserField>).

    It turns out if you don't have any UserFields specified - as per the default config - then the indexer will create all possible fields automagically - 152 in my case! But if you try and add one, then that is the only one that is created. The best fix is probably to create a whole different index to play around with. Perhaps the comment in the config file should warn about this behaviour rather than simply saying Do Not Remove,

    @Tobias I know you said you haven't messed around with ExamineIndex.config definitions - but it might be worth double-checking as it would cause these symptoms? Also check the tracelog for errors when indexing?

  • Tobias Lopez 64 posts 210 karma points
    Dec 10, 2018 @ 12:33
    Tobias Lopez
    0

    I got it back working by adding all the fields manually:

    Here's my ExamineIndex.config:

    <ExamineLuceneIndexSets>
      <!-- The internal index set used by Umbraco back-office - DO NOT REMOVE -->
      <IndexSet SetName="InternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/Internal/">
        <IndexAttributeFields>
          <add Name="id" />
          <add Name="nodeName"/>
          <add Name="nodeTypeAlias" />
          <add Name="writerName" />
          <add Name="updateDate" />
          <add Name="parentID" />
        </IndexAttributeFields>
        <IndexUserFields>
          <add Name="umbracoFile" />
        </IndexUserFields>
      </IndexSet>
    
      <!-- The internal index set used by Umbraco back-office for indexing members - DO NOT REMOVE -->
      <IndexSet SetName="InternalMemberIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/InternalMember/">
        <IndexAttributeFields>
          <add Name="id" />
          <add Name="nodeName"/>
          <add Name="updateDate" />
          <add Name="writerName" />
          <add Name="loginName" />
          <add Name="email" />
          <add Name="nodeTypeAlias" />
        </IndexAttributeFields>
      </IndexSet>
    
      <!-- Default Indexset for external searches, this indexes all fields on all types of nodes-->
      <IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/">
        <IndexAttributeFields>
          <add Name="id" />
          <add Name="nodeName"/>
          <add Name="nodeTypeAlias" />
          <add Name="writerName" />
          <add Name="updateDate" />
          <add Name="parentID" />
        </IndexAttributeFields>
        <IndexUserFields>
          <add Name="umbracoFile" />
        </IndexUserFields>
      </IndexSet>
    </ExamineLuceneIndexSets>
    
  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    Dec 10, 2018 @ 23:33
    Shannon Deminick
    0

    That shouldn't be needed at all. The default config specifies no fields and they should definitely not be listed there else those are the only fields indexed and you'll have issues with media.

    This is how the config should be setup:

    https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web.UI/config/ExamineIndex.Release.config

    Was it like that before when you had problems?

    Are you working with a vanilla install of Umbraco or is this an existing site? If so, do you have some packages or event handlers in use that customize index values? Would you be able to test with a vanilla Umbraco install?

Please Sign in or register to post replies

Write your reply to:

Draft