[Fixed] RebuildSearchIndex|System.ArgumentException: it doesn’t make sense to have a field that is neither indexed nor stored.

Posted on

Whilst rebuilding the quick search indexes in the control panel, I’ve encountered the issue below:

Job started: RebuildSearchIndex|System.ArgumentException: it doesn’t make sense to have a field that is neither indexed nor stored
at Lucene.Net.Documents.Field..ctor(String name, Boolean internName, String value_Renamed, Store store, Index index, TermVector termVector)
at Sitecore.Search.Crawlers.BaseCrawler.CreateDataField(String name, String value)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddSpecialFields(Document document, Item item)
at Sitecore.Search.Crawlers.DatabaseCrawler.IndexVersion(Item item, Item latestVersion, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddItem(Item item, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Crawlers.DatabaseCrawler.AddTree(Item root, IndexUpdateContext context)
at Sitecore.Search.Index.Rebuild()
at Sitecore.Shell.Applications.Search.RebuildSearchIndex.RebuildSearchIndexForm.Builder.Build()|Job ended: RebuildSearchIndex (units processed: 39449)

it doesnt make sense to have a field that is neither index.png

Solution:

Find the items with the greater length than 120 and rename those items in Sitecore content editor.

SELECT [ID]
,[Name]
,[TemplateID]
,[MasterID]
,[ParentID]
,[Created]
,[Updated]
FROM [dbo].[Items]
WHERE LEN([NAME]) > 120

Note: 100 is the default MAX item length specified in web.config.

Check_item_name_length_greater_than_120.png

Thanks to this post by Chaturanga ranatunga

Alternatively, if the result is too many, then you might want to increase the value of the setting MaxItemNameLength to 200 in the \Website\web.config instead.

<setting name="MaxTreeDepth" value="20" />
<!-- MAX ITEM NAME
Specifies the maximum length of an item name.
Default value: 100
-->
<setting name="MaxItemNameLength" value="1000" />

Remember: Please do not forget to revert back the value if needed.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s