I have a DB that must be full text indexed, so I added the code below to create one if it is not allready indexed:
if (database.isFTIndexed()){
database.updateFTIndex(false)
} else {
var options:int = database.FTINDEX_ALL_BREAKS + database.FTINDEX_ATTACHED_FILES + database.FTINDEX_IMMEDIATE
database.createFTIndex(options , true);
database.updateFTIndex(false);
}
sessionScope.put("ssSelectedView","vwWFSProfile")
When it runs I get the following error: Error source Page Name:/xpWFSAdmin.xsp Control Id: button2 Property: onclick
Exception Error while executing JavaScript action expression com.ibm.jscript.types.GeneratedWrapperObject$StaticField incompatible with com.ibm.jscript.types.FBSValue
Expression
1: #{javascript:if (database.isFTIndexed()){ 2: database.updateFTIndex(false) 3: } else { 4: var options:int = database.FTINDEX_ALL_BREAKS + database.FTINDEX_ATTACHED_FILES + database.FTINDEX_IMMEDIATE 5: database.createFTIndex(options , true); 6: database.updateFTIndex(false); 7: } 8: sessionScope.put("ssSelectedView","vwWFSProfile")}
It is choking on line 4 it does not like the summing of the parameters. So I comment out line 4 and change line 5 to read database.createFTIndex(4, true) then I get this error:
Error while executing JavaScript action expression Script interpreter error, line=5, col=18: [TypeError] Exception occurred calling method NotesDatabase.createFTIndex(number, boolean) null
JavaScript code
1: if (database.isFTIndexed()){ 2: database.updateFTIndex(false) 3: } else { 4: //var options:int = database.FTINDEX_ALL_BREAKS + database.FTINDEX_ATTACHED_FILES + database.FTINDEX_IMMEDIATE 5: database.createFTIndex(4 , true); 6: database.updateFTIndex(false); 7: } 8: sessionScope.put("ssSelectedView","vwWFSProfile")
Can't seem to get it to work. I can go into the DB and manually create the index so it is not a rights issue.
if (database.isFTIndexed()){ database.updateFTIndex(false) } else { database.createFTIndex(0 , false); database.setFTIndexFrequency(4); database.updateFTIndex(false); }
If Irun this on the local replica copy it works fine. If I try to run it on the server copy I get a 500 error and the index is not created. tried using database.FTINDEX_ALL_BREAKS and it fails all the time so just added the numbers. I have to step away from this for awhile, I'm so frustrated. – Bill F Dec 15 '13 at 23:02