I have been having a very annoying issue. I have been working with the following script to derive a calendar from a specific field:
DECLARE FIELD DEFINITION Tagged ('$date')
Dayname($1) as [Date] Tagged ('$date')
,Dual(Year($1), YearStart($1)) as [Year] Tagged ('$axis', '$year')
,WeekYear($1) as [WeekYear] Tagged ('$axis', '$weekyear')
,Dual('Q'&Num(Ceil(Num(Month($1))/3)),Num(Ceil(NUM(Month($1))/3),00)) as [Quarter] Tagged ('$quarter')
,Month($1) as [Month] Tagged ('$axis','$month')
,Dual('W'&Num(Week($1),00), Num(Week($1),00)) as [Week] Tagged ('$axis','$weeknumber')
,Day(Floor($1)) as [Day] Tagged ('$axis','$integer')
DERIVE FIELDS FROM EXPLICIT TAGS '$calendar' USING [Calendar];
Then I am tagging a field named [%Date_key] as '$calendar'
For some reason for a specific application I am getting an unknown error when loading the script.
After testing I can see that the problem is happening because of the name Month. It is seems that it is conflicting somehow with the field [%Data_Key]. If I change any of this two fields, the reload works.
Also, if copy all my script to a new application and run it, it also works. However, I don't believe this is a solution as the application was working until yesterday and the problem may happen again.
Furthermore, changing the name of any of this fields will cause major impact in all my metrics in this and other applications as we use the same structure to all applications. Therefore, this should not be a solution as well.
I see in the post Create Search Index on Reload Failure that some people are having the same problem. I don't know exactly the consequences of changing CreateSearchIndexOnReload to 0.
Does someone have an idea of what could be happening?