Developer forum

Forum » CMS - Standard features » System.FormatException: Invalid shift value in prefixCoded string (is encoded value really an INT?)

System.FormatException: Invalid shift value in prefixCoded string (is encoded value really an INT?)

Peter Leleulya
Peter Leleulya
Reply

Hi guys, 

I have an update issue I can't seem to fix myself.

It's about the product search / index.

I started out with an application with a Dynamicweb 9.14.1 Admin.

I've updated it to 9.15.7 and updated ALL nuget packages on june 1st and resolved all consolidates.
I've changed all my code to remove obsolete and depricated notifications.

I had a working website and working admin and working product search.
After updating the product index the product search was broken.
The template showed:

An error occurred while attaching module (Dynamicweb.Frontend.Content) System.FormatException: Invalid shift value in prefixCoded string (is encoded value really an INT?) at Lucene.Net.Util.NumericUtils.PrefixCodedToInt(String prefixCoded) in d:\Lucene.Net\FullRepo\trunk\src\core\Util\NumericUtils.cs:line 260 at Lucene.Net.Search.FieldCacheImpl.IntCache.CreateValue(IndexReader reader, Entry entryKey) in d:\Lucene.Net\FullRepo\trunk\src\core\Search\FieldCacheImpl.cs:line 485 at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key) in d:\Lucene.Net\FullRepo\trunk\src\core\Search\FieldCacheImpl.cs:line 238 at Lucene.Net.Search.FieldCacheImpl.GetInts(IndexReader reader, String field, IntParser parser) in d:\Lucene.Net\FullRepo\trunk\src\core\Search\FieldCacheImpl.cs:line 452 at Lucene.Net.Search.FieldCacheImpl.IntCache.CreateValue(IndexReader reader, Entry entryKey) in d:\Lucene.Net\FullRepo\trunk\src\core\Search\FieldCacheImpl.cs:line 474 at Lucene.Net.Search.FieldCacheImpl.Cache.Get(IndexReader reader, Entry key) in d:\Lucene.Net\FullRepo\trunk\src\core\Search\FieldCacheImpl.cs:line 238 at Lucene.Net.Search.FieldCacheImpl.GetInts(IndexReader reader, String field, IntParser parser) in d:\Lucene.Net\FullRepo\trunk\src\core\Search\FieldCacheImpl.cs:line 452 at Lucene.Net.Search.FieldComparator.IntComparator.SetNextReader(IndexReader reader, Int32 docBase) in d:\Lucene.Net\FullRepo\trunk\src\core\Search\FieldComparator.cs:line 490 at Lucene.Net.Search.TopFieldCollector.MultiComparatorNonScoringCollector.SetNextReader(IndexReader reader, Int32 docBase) in d:\Lucene.Net\FullRepo\trunk\src\core\Search\TopFieldCollector.cs:line 483 at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector) in d:\Lucene.Net\FullRepo\trunk\src\core\Search\IndexSearcher.cs:line 238 at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields) in d:\Lucene.Net\FullRepo\trunk\src\core\Search\IndexSearcher.cs:line 212 at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort) in d:\Lucene.Net\FullRepo\trunk\src\core\Search\IndexSearcher.cs:line 194 at Dynamicweb.Indexing.Lucene.LuceneIndexProvider.SearchInternal(IQuery query, QuerySettings settings) at Dynamicweb.Indexing.Querying.QueryService.Query(IQuery query, QuerySettings settings) at Dynamicweb.Ecommerce.Indexing.ProductQueryHelper.ExecuteQuery(IQuery query, QuerySettings settings) at Dynamicweb.Ecommerce.Indexing.ProductQueryHelper.GetProductsAutoIdsFromIndexQuery(IQuery query, ProductCatalogSettings settings, QuerySettings querySettings, IEnumerable`1& facetViewModel, IEnumerable`1& spellCheckerResult) at Dynamicweb.Ecommerce.ProductCatalog.ProductCatalogFrontend.RenderProductList(ProductCatalogSettings settings, QuerySettings querySettings, IQuery query, String groupId, Boolean feed) at Dynamicweb.Ecommerce.ProductCatalog.ProductCatalogFrontend.GetContent() at Dynamicweb.Frontend.Content.GetModuleOutput(Paragraph paragraph, PageView pageview)

I've removed our custom code and tried again, with the same result unfortunately.
No helpful error logging was found.

Ive downgraded the Dynamicweb.Index.Lucene dll back to the 1.3.14 version (the one before my update).
This resulted to the Admin being downgraded to 9.14.3. :(
After rebuilding the index the issue remained.

I've downgraded the Dynamicweb.Index dll back to the 8.0.4 version (the one before my update).
This resulted to the Admin being downgraded to 9.14.1, which was the one before I started the update. :( :(
But now my code wasn't compatible anymore.

So I rolled back to the situation before my updates and rebuilt the index again.
Now the problem is gone.

But I'm back wher I started ....

Does anyone know what to do?
It feels like there is a bug in the indexing functionality somewhere, but can't point out where exactly. ...

#help


 

 


Replies

 
Peter Leleulya
Peter Leleulya
Reply

FIXED

 

I was using the index column ProductVariantProdCounter in my repository index.
I had to change its type to System.Int64 in the index field setup.

It had been changed from int32 to int64 in some release ... which broke my index.

 

You must be logged in to post in the forum