Forum OpenACS Q&A: About Setting Up OpenFTS

Collapse
Posted by James Bennin on
I could not download the OpenFTS tar file from your site, but I was able to find somewhere else on the internet.  I downloaded it and proceeded with the set-up.  Everything worked up till the point where I received an error on the log file.  The error read " [-sched-] Error: Database operation "0or1row" failed (exception NSINT, "Query returned more than one row.") ".  What is the problem and how can I fix?  Also how do I finish testing the Full Text Search?  How does the Full Text Search work? Does it search postgres for information as well?

Thank you for your help

James

Collapse
Posted by Dave Bauer on
James,

Plese tell us more so we can help you. Specifically, what were you doing when the error occured. What did you expect to happen, and what happened instead. That is elaborate on what "everything worked" means and give more information on what went wrong.

Turn on VERBOSE LOGSQLERRORS in the database driver section of your aolserver config file.

Please post the actual query that caused the error. If you check the log file and have verbose and logsqlerrors set to true the entire query will show in the log. You might have to scroll back a bit to find it.

Feel free to post the relevant section from the log. Use the HTML format and place the log between <PRE></PRE> tags.

Collapse
Posted by James Bennin on
Well I guess you can say I'm still in the beginning of fully setting up OpenACS. I was trying to install the Full Text Search OpenFTS option and was following every step. So I finished mounting the OpenFTS package. I noticed the error after creating and mounting the new folder called "search". After restarting the server, I looked on the error log and I saw this message:

[12/Aug/2003:10:33:23][2269.16387][-sched-] Error: Database operation "0or1row" failed (exception NSINT, "Query returned more than one row.")

SQL:
        select package_id from apm_packages where package_key = 'search'

Database operation "0or1row" failed (exception NSINT, "Query returned more than one row.")

SQL:
        select package_id from apm_packages where package_key = 'search'

    while executing
"ns_pg_bind 0or1row nsdb0 {
        select package_id from apm_packages where package_key = :package_key
    }"
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql"
    invoked from within
"db_exec 0or1row $db $full_name $sql"
    invoked from within
"set selection [db_exec 0or1row $db $full_name $sql]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle db {
        set selection [db_exec 0or1row $db $full_name $sql]
    }"
    (procedure "db_string" line 7)
    invoked from within
"db_string apm_package_id_from_key {
        select package_id from apm_packages where package_key = :package_key
    } -default 0"
    (procedure "apm_package_id_from_key_mem" line 2)
    invoked from within
"apm_package_id_from_key_mem search"
    ("eval" body line 1)
    invoked from within
"eval $script"
    invoked from within
"ns_cache eval util_memoize $script {
            list $current_time [eval $script]
        }"
    (procedure "util_memoize" line 20)
    invoked from within
"util_memoize "apm_package_id_from_key_mem $package_key""
    (procedure "apm_package_id_from_key" line 2)
    invoked from within
"apm_package_id_from_key search"
    (procedure "search_indexer" line 3)
    invoked from within
"search_indexer"
    ("eval" body line 1)
    invoked from within
"eval [concat [list $proc] $args]"
    (procedure "ad_run_scheduled_proc" line 43)
    invoked from within
"ad_run_scheduled_proc {f f 60 search_indexer {} 1060691543 0 t}"

What is the problem? How do I fix this? I hope I was very specific and the information I provided helps you.
Collapse
Posted by Dave Bauer on
James,

Excellent!

Here is what happened. There is more than one instance of Search installed. Apparently the Search package does not support multiple package instances, but allows them in error.

The Search package is already installed, but not mounted to a URL.

To fix this find your search package in the site map. Point your mouse at the link to "Set Parameters" or "Set Permissions" for the package and note the package_id of this from the URL of the link to unmount the package. You will need it in a minute. Unmount the package instance.

Next go to the Unmouted Applications link below the site map.

You have to delete one of the search package instances. By examing the URLs of the [delete] links, find the package_id of the search package you just unmounted and delete it.

Now go back to the site-map. You should have a directory with no packages mounted to it where Search used to be. Click mount and choose the one remaining Search package instance to mount there.