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
<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>
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?
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/
I don't really understand how it can index other data but not have nodeName or __NodeName since these are coded specifically to be indexed by Umbraco, see:
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?
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.
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?
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 withUmbraco.TypedMedia()
. When I use the MediaService it works.Am I missing a config or so?
Code
Error Message
Versions
ExamineSettings.config
ExamineIndex.config
I didn't touch this file
(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?
Do you know where i could look into to pin point the issue?
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?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.
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.
Were could this field get lost?
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/
I just downloaded the
InternalIndexSet
and opened it with luke. You are right, i dont see the __nodeName or nodeName.can i somehow force the indexing of the missing fields?
I don't really understand how it can index other data but not have
nodeName
or__NodeName
since these are coded specifically to be indexed by Umbraco, see: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?
I got it back working by adding all the fields manually:
Here's my ExamineIndex.config:
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?
is working on a reply...