Some pages are not found using "suggest" in AppWithinMinutes Page object

We are using page objects to select pages that were created in AppWithinMinutes. Because there are many pages that should come up (well over 500), we use the “use suggest” feature for page selection.

Sometimes the pages are found when using the “use suggest” feature, but often times the page in question is not found. The only way we can get the page to show up is to paste in the page’s fullname in the page object, then and only then will the page become available for selection.

What could be causing this?

The suggestions you get depend very much on the way the Page property is configured (e.g. if you have use a custom query or if you specify a class name).

I’m using the class name, and all of the missing documents in the search suggest have the proper classname, and were created the same way as the documents that were found…

If you left the “Hibernate Query” empty then the suggestions are retrieved from the database using a query computed based on the specified class name. Did you specify the “Id Field Name” or the “Value Field Name” when configuring the page property? If not then the query matches the page reference and the page raw title. I can think of 3 possible causes for not getting the expected suggestions:

  • the page you expect to get is hidden
  • the raw title of the page you expect to get is different than its rendered title (e.g. if the title is controlled by a sheet or if you use Velocity code in the page title)
  • the current user doesn’t have view right on the top N pages returned by the query and the page you expect to get is below N. The issue here is that access rights are checked after the query is executed, and the query returns the top N results. If all of these are protected then you don’t see any suggestions. Fetching suggestions until we find some for which the current user has view right doesn’t scale: you could have 1001 pages, and only the last one is viewable by the current user; in this case we would have to make 1001/N queries, load all these pages from the database and do a lot of access rights checking.

Hope this helps,
Marius

We are definitely getting closer! I do render titles by using velocity in the page title often. However I thought I imported them all the same way, and some of them are showing up.

I did not specify the id and the value fields. Question: would it hurt anything if I filled them in with doc.title and doc.value now? I have about 500 existing records that would be affected.

Of course I can’t re-create the problem right now because Murphy’s Law. When it crops up again, I will compare the raw title and the rendered title and will come back to mark ‘solved’ if correcting it fixes the issue.

Thank you!