I need help for solving the following problem. Checking log i found a lot of indexing nodes errors reading as follow:
Error indexing node: System.IO.FileNotFoundException: Could not find
file
'C:\Inetpub\vhosts\ibis-sevilla.es\httpdocs\data\_systemUmbracoIndexDontDelete\segments'.
File
name:
'C:\Inetpub\vhosts\ibis-sevilla.es\httpdocs\data\_systemUmbracoIndexDontDelete\segments'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path,
FileMode mode, FileAccess access, FileShare share) at
Lucene.Net.Store.FSIndexInput.Descriptor..ctor(FSIndexInput
enclosingInstance, FileInfo file, FileAccess mode) at
Lucene.Net.Store.FSIndexInput..ctor(FileInfo path) at
Lucene.Net.Store.FSDirectory.OpenInput(String name) at
Lucene.Net.Index.SegmentInfos.Read(Directory directory) at
Lucene.Net.Index.IndexWriter.AnonymousClassWith.DoBody() at
Lucene.Net.Store.Lock.With.Run() at
Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, Boolean
create, Boolean closeDir) at Lucene.Net.Index.IndexWriter..ctor(String
path, Analyzer a, Boolean create) at
umbraco.cms.businesslogic.index.Indexer.ContentIndex(Boolean
ForceRecreation) at
umbraco.cms.businesslogic.index.Indexer.IndexNode(Guid ObjectType,
Int32 Id, String Text, String UserName, DateTime CreateDate, Hashtable
Fields, Boolean Optimize) at
umbraco.cms.businesslogic.web.Document.Index(Boolean Optimze)
Now one of my xslt scripts that was previously working throws the following error:
System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at umbraco.library.DateGreaterThanToday(String firstDate)
Basically it checks if a group of different document types (news, jobs, seminaries,...) have a DateGreaterThanToday. Removing a concrete document type (jobs) from the check make the script work again.
Is it possible that indexing node errors cause xslt script faile?
I think there are 2 separate issues here: the Lucene index (for back-office search) is corrupt or missing; and then the date error.
Check if the following folder exists, and if it has any other files/folders in it: "\data\_systemUmbracoIndexDontDelete"
If it doesn't exist, then recreate it, and go to the following webpage: /umbraco/reindex.aspx ... that page will rebuild the Lucene index for back-office search.
For the dates - what format are your dates in? I'm thinking that its probably an issue between "MM/dd/yyyy" versus "dd/MM/yyyy" formats?
To your knowledge has anything changed on your web-service recently? Upgrades, etc?
I have checked that folder "\data\_systemUmbracoIndexDontDelete" exists and it has other files/folders in it. Anyway i have tried reindexing but the script never ends. I mean, after reindexing thousands of documents begins reindexing from 0 to Last document again and again.
Otherwise the line causing an error in my xslt script is:
<xsl:for-each select="umbraco.library:GetXmlAll()/descendant-or-self::node [(@nodeTypeAlias ='Noticia' or @nodeTypeAlias ='Convocatoria' or @nodeTypeAlias ='OfertaEmpleo' or @nodeTypeAlias ='Seminario') and umbraco.library:DateGreaterThanToday(umbraco.library:FormatDateTime(data[@alias = 'plazoLimite'], 'yyyy-MM-dd')) = 'true']">
Removing or @nodeTypeAlias ='Convocatoria' from the script make it works ok. Convocatoria document type has plazoLimite date field also and the script have been working correctly during months till yesterday with indexing errors so i have to remove the code as i said.
Consider that Convocatoria has the same fields than OfertaEmpleo and all types have data[@alias = 'plazoLimite']. It's weird cause has been working ok for months.
Recently i installed .NET 4.0 framework on server but other Umbraco sites are working ok after that. All of them under 2.0/3.5 framework.
Is it possible that one of the "Convocatoria" content pages has an invalid date in the "plazoLimite" property?
I'm thinking that there is one value is that breaking the entire for-each loop - as opposed to the logic being wrong.
It might be worth adding another condition in the for-each select...
<xsl:for-each select="umbraco.library:GetXmlAll()/descendant-or-self::node [(@nodeTypeAlias ='Noticia' or @nodeTypeAlias ='Convocatoria' or @nodeTypeAlias ='OfertaEmpleo' or @nodeTypeAlias ='Seminario') and (data[@alias = 'plazoLimite'] != '' and umbraco.library:DateGreaterThanToday(umbraco.library:FormatDateTime(data[@alias = 'plazoLimite'], 'yyyy-MM-dd')) = 1)]">
I also have a suggestion for making the XPath expression shorter:
$currentPage/ancestor-or-self::node[@level=1]/descendant-or-self::node[contains('Noticia,Convocatoria,OfertaEmpleo,Seminario', @nodeTypeAlias) and (data[@alias = 'plazoLimite'] != '' and umbraco.library:DateGreaterThanToday(umbraco.library:FormatDateTime(data[@alias = 'plazoLimite'], 'yyyy-MM-dd')))]
This keeps the XPath navigating in the $currentPage context. The @nodeTypeAlias comparison is reversed, so instead of does THIS equal THAT or THAT or THAT, etc. We're saying do THESE contain THIS? (If that makes sense?) Don't feel obliged to change your XPath, using whatever makes the most logic to you!
It works like a charm now! plazoLimite was not mandatory for Convocatoria document type (my mistake) so my costumer may have created recently one or more documents of this type with no data for plazoLimite.
I have also changed XPath expression, thanks a lot! Ivan
Error indexing node
Hi.
I need help for solving the following problem. Checking log i found a lot of indexing nodes errors reading as follow:
Error indexing node: System.IO.FileNotFoundException: Could not find file 'C:\Inetpub\vhosts\ibis-sevilla.es\httpdocs\data\_systemUmbracoIndexDontDelete\segments'. File name: 'C:\Inetpub\vhosts\ibis-sevilla.es\httpdocs\data\_systemUmbracoIndexDontDelete\segments' at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Lucene.Net.Store.FSIndexInput.Descriptor..ctor(FSIndexInput enclosingInstance, FileInfo file, FileAccess mode) at Lucene.Net.Store.FSIndexInput..ctor(FileInfo path) at Lucene.Net.Store.FSDirectory.OpenInput(String name) at Lucene.Net.Index.SegmentInfos.Read(Directory directory) at Lucene.Net.Index.IndexWriter.AnonymousClassWith.DoBody() at Lucene.Net.Store.Lock.With.Run() at Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, Boolean create, Boolean closeDir) at Lucene.Net.Index.IndexWriter..ctor(String path, Analyzer a, Boolean create) at umbraco.cms.businesslogic.index.Indexer.ContentIndex(Boolean ForceRecreation) at umbraco.cms.businesslogic.index.Indexer.IndexNode(Guid ObjectType, Int32 Id, String Text, String UserName, DateTime CreateDate, Hashtable Fields, Boolean Optimize) at umbraco.cms.businesslogic.web.Document.Index(Boolean Optimze)
Now one of my xslt scripts that was previously working throws the following error:
System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at umbraco.library.DateGreaterThanToday(String firstDate)
Basically it checks if a group of different document types (news, jobs, seminaries,...) have a DateGreaterThanToday. Removing a concrete document type (jobs) from the check make the script work again.
Is it possible that indexing node errors cause xslt script faile?
I am using Umbraco version 4.0.3.
Thanks a lot for your help!
Ivan
Hi Ivan,
I think there are 2 separate issues here: the Lucene index (for back-office search) is corrupt or missing; and then the date error.
Check if the following folder exists, and if it has any other files/folders in it: "\data\_systemUmbracoIndexDontDelete"
If it doesn't exist, then recreate it, and go to the following webpage: /umbraco/reindex.aspx ... that page will rebuild the Lucene index for back-office search.
For the dates - what format are your dates in? I'm thinking that its probably an issue between "MM/dd/yyyy" versus "dd/MM/yyyy" formats?
To your knowledge has anything changed on your web-service recently? Upgrades, etc?
Cheers, Lee.
Hi Lee.
I have checked that folder "\data\_systemUmbracoIndexDontDelete" exists and it has other files/folders in it. Anyway i have tried reindexing but the script never ends. I mean, after reindexing thousands of documents begins reindexing from 0 to Last document again and again.
Otherwise the line causing an error in my xslt script is:
<xsl:for-each select="umbraco.library:GetXmlAll()/descendant-or-self::node [(@nodeTypeAlias ='Noticia' or @nodeTypeAlias ='Convocatoria' or @nodeTypeAlias ='OfertaEmpleo' or @nodeTypeAlias ='Seminario') and umbraco.library:DateGreaterThanToday(umbraco.library:FormatDateTime(data[@alias = 'plazoLimite'], 'yyyy-MM-dd')) = 'true']">
Removing or @nodeTypeAlias ='Convocatoria' from the script make it works ok. Convocatoria document type has plazoLimite date field also and the script have been working correctly during months till yesterday with indexing errors so i have to remove the code as i said.
Consider that Convocatoria has the same fields than OfertaEmpleo and all types have data[@alias = 'plazoLimite']. It's weird cause has been working ok for months.
Recently i installed .NET 4.0 framework on server but other Umbraco sites are working ok after that. All of them under 2.0/3.5 framework.
Any ideas?
Thanks a lot Lee!
Hi Ivan,
Is it possible that one of the "Convocatoria" content pages has an invalid date in the "plazoLimite" property?
I'm thinking that there is one value is that breaking the entire for-each loop - as opposed to the logic being wrong.
It might be worth adding another condition in the for-each select...
I also have a suggestion for making the XPath expression shorter:
This keeps the XPath navigating in the $currentPage context. The @nodeTypeAlias comparison is reversed, so instead of does THIS equal THAT or THAT or THAT, etc. We're saying do THESE contain THIS? (If that makes sense?) Don't feel obliged to change your XPath, using whatever makes the most logic to you!
Cheers, Lee.
It works like a charm now! plazoLimite was not mandatory for Convocatoria document type (my mistake) so my costumer may have created recently one or more documents of this type with no data for plazoLimite.
I have also changed XPath expression, thanks a lot!
Ivan
is working on a reply...