Forum OpenACS Q&A: Re: Problem and a doubt with the Search package.

Collapse
Posted by Emmanuelle Raffenne on
Hi Jorge,

I'm glad to see you around :).

Regarding the missing template dotlrn-search and the missing search::url callback implementation in file-storage, both have been fixed on the oacs-5-3 branch and those fixes will be included in the next release (dotlrn 2.3.1). You can update your local installation of file-storage and search from the repository using the oacs-5-3 tag.

Collapse
Posted by Jorge Couchet on
Hi Emmanuelle!

I'm around with some troubles 😊

Excellent! I'm doing that you suggest and reporting the advances.

Cheers

Jorge

Collapse
Posted by Jorge Couchet on
Hi Emmanuelle,

The actual versions of file-storage and search that I have are:

File Storage (FS): 5.3.0d1
Search: 5.3.1

Those versions are under the oacs-5-3 branch. If I try to upgrade through acs-admin/install/ (using "Upgrade from repository"), I have the message: "No packages on your system need upgrading." And if try to reload the package through the APM, I have the message: "There are no changed files to reload in this package.".

Under the oacs-5-4 branch, the FS version changes to 5.4.0d4 and the Search version didn't change. Is the 5.4.0d4 version of FS that I need to install?. If the answer is yes, which is the procedure for that?.

Cheers

Jorge

Collapse
Posted by Emmanuelle Raffenne on
Jorge,

I assume you installed from the 2.3.0 tarball. In this case, to upgrade from the repository:

- cd to your packages/ directory (/var/lib/aolserver/service0/packages?)
- remove file-storage/ and search/ directories
- from your packages/ directory, type:

cvs -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-3 search
cvs -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-3 file-storage
- restart your server
Collapse
Posted by Jorge Couchet on
Emmanuelle,

Excellent! Your instruction worked very well!!. Thanks a lot!

Only remains a problem:
I have searched the word "Estrategia" that is in the Forum and Faq, and the search brought me what is in Forum, but not that is in FAQ. It would seem to be that the Search Package isn't indexing the FAQ's content. Is there any extra trick in order to have the FAQ's content indexed?.

Cheers

Jorge.

Collapse
Posted by Jorge Couchet on
Well, I have inserted in the search_observer_queue the FAQ:

***************
insert into search_observer_queue ( select entry_id, current_timestamp, 'INSERT' from faq_q_and_as );
***************

And now the content of the FAQ is indexed. But if I put a new question with the word "estrategia" in the FAQ, the new question didn't appear in the search. It would seem to be that is failing the automatic indexing. Any clue for this?.

Collapse
Posted by Jorge Couchet on
Reading the document that states how to make an object searchable (in OpenACS documentation) appears the following:

**********
"if your object type uses the content repository to store its items, then you are done. If not, an extra step is required to inform the search_observer_queue of new content items, updates or deletions. We do this by adding triggers on the table that stores the content items of your object type"
**********

Isn't the FAQ package using the Content Repository and is necessary to add manually to the FAQ table the triggers to inform the search_observer_queue?.

Collapse
Posted by Emmanuelle Raffenne on
Jorge,

I don't think FAQ is using the content repository. The triggers to fill up the search_observer_queue table are missing in the FAQ package, that's why the content is not indexed.

Collapse
Posted by Jorge Couchet on
Emmanuelle,

Thanks a lot!! I'm adding the triggers to the FAQ Package!

Collapse
Posted by Jorge Couchet on
Ready! The content of the FAQ Package is now indexed automatically. For that I have added the following in the database:

******************

create function faq_sc__itrg ()
returns opaque as '
begin
perform search_observer__enqueue(new.entry_id,''INSERT''); return new;
end; ' language 'plpgsql';

create function faq_sc__dtrg ()
returns opaque as '
begin
perform search_observer__enqueue(old.entry_id,''DELETE''); return old;
end; ' language 'plpgsql';

create function faq_sc__utrg ()
returns opaque as '
begin
perform search_observer__enqueue(old.entry_id,''UPDATE''); return old;
end; ' language 'plpgsql';

create trigger faq_sc__itrg after insert on faq_q_and_as for each row execute procedure faq_sc__itrg ();

create trigger faq_sc__dtrg after delete on faq_q_and_as for each row execute procedure faq_sc__dtrg ();

create trigger faq_sc__utrg after update on faq_q_and_as for each row execute procedure faq_sc__utrg ();

******************

Thanks a lot for the help!

Jorge.

Collapse
Posted by Emmanuelle Raffenne on
Thanks Jorge. I've added the triggers to the repository at the oacs-5-3 branch.
Emmanuelle, you are welcome!!!