Anthony,
I'm using the same technique in an application I'm
working on: perform the FT search and then parse the resultset to
transform it into a Javascript array.
First step for your problem would be to figure out what part of your code is taking so much time. You can use my
Xpage Debug Toolbar for
that, but it's most likely the part where you loop through all the
entries. The FT search itself will probably only take a couple of milliseconds. The problem lies in all the .getItemValue calls you're performing: they take time and that quickly adds up for large resultsets.
There are some alternatives for reading the information from the document you might consider (I'm currently also testing a couple of options:
- read the values from one or more view columns instead of the document.
- store all the values you need from every document in a JSON object and serialize it to a field when saving a document (using the fromJson and toJson methods): that way you only need to perform one read action from a view column/ the document.
Mark