Thursday, April 25, 2013

Search issues in XPages #1 - Dont forget to Create FTIndex in replicas manually

I have been working with XPages searches for a long time. It has been a while since I have worked with XPages and I was almost happy to get my hands on it again. I had to create a search feature that would help my clients perform a decent search.

Since they were ok with performing an FTIndex on the application, XPage searches was a nice option that occured to me.

To my frustration, proving that I got a little rusty with XPages, it took me 4 hours to get this search feature complete. I was bombarded with errors and for some reason, my search was not working the way I expected it to work.

Following are the summary of the issues that took me time to identify and fix

#1. Enable "Display Xpage runtime error page" in the XPages tab in "Application Properties". Else you would end up debugging for a long time

#2. My XPage's view control lost its data source referance and was showing a 'red X' in the application navigator which I missed to notice oweing to large number of design elements.

#3. Check source code pane, now and then to find if there are any errors being displayed. It will exist there with out any warning and you would not notice it on the design pane of the XPage

#4. Enable FTIndex inorder to work with the native search feature available with XPages

#5. Be warned, in case of clustered server, were replicas of databases from multiple servers are used to render a webpage. Because, FTIndex dont ret replicated. They need to be enabled and updated across replicas separately.

My search worked like charm after I rediscovered all of these items again :(

Wednesday, April 24, 2013

StartKey in View Url

I was working with StartKey argument in a view's url to help enable a search feature.

It was a headache. For some reason my startKey argrment was completely ignored by the browser.

EOD I found the following,

1. The first column in the view should show only simple text values. Date values with "/"s and other values with special characters are a head ache.
2. This wont work properly with views containing their first column as a hidden column
3. Your first column must be sorted for this argument to work.

I am not sure whether all of these are true or not. But its my understanding as per my experimentations so far.