Home
The Toolkit for Online Communities
17120 Community Members, 0 members online, 1947 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : Search and OpenFTS

Forum OpenACS Q&A: Search and OpenFTS

Icon of envelope Request notifications

Collapse
Posted by James Bennin on
I have followed the step for installing OpenFTS and search.  The problem is when I go to the search page on my index page, and I type in a word the search does not return any results.  What is the problem?  Is there something I am not doing right??
Collapse
2: Re: Search and OpenFTS (response to 1)
Posted by Dave Bauer on
James,

I realize you might be frustrated, OpenACS and OpenFTS unfortunately aren't the easiest software to install.

Please provide some usuable information if you expect to have your questions answered on the forums.

Here are some relevant items:

What version of OpenACS are you using. What version of OpenFTS. What version of Postgresql. Which search_enabled packages do you have installed?

Try these queries in psql and post the exact results.

select count(*) from search_observer_queue;
(if there aren't more than a few rows, go ahead and post the results to
select * from search_observer_queue;

select count(*) from txt;

Browse your site to /acs-service-contract/

Under Installed Bindings paste in any items that are called FtsEngineDriver or FtsContentProvider.

Do the same for Valid Uninstalled Bindings.
Also do the same for Invalid Uninstalled Bindings.

Collapse
3: Re: Search and OpenFTS (response to 2)
Posted by James Bennin on
Thanks for your prompt response. I will try to make my questions not so vague anymore. This the version of postgres and red hat I'm using:

service0=# select version();
                                                 version
---------------------------------------------------------------------------------------------------------
 PostgreSQL 7.2.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
(1 row)

I am using OpenACS version 4.6.3. This is the result when I type in the different queries you asked me:

service0=# select count(*) from search_observer_queue;
 count
-------
     0
(1 row)

service0=# select * from search_observer_queue;
 object_id | event_date | event
-----------+------------+-------
(0 rows)

service0=# select count(*) from txt;
 count
-------
     0
(1 row)

From I am seeing and what I read from different forums answers and documentations is that I have not made any object searchable. How do I go about that? What is an object anyways? I know I am asking so many basics questions, please bear with me. Once again, thank you for your help. James PS: I also get this error on my log file. It seems like there is an attempt for a email deliver, but the attempt is failing.
[14/Aug/2003:11:59:24][3379.745483][-sched:8-] Error: ns_sendmail failed: could not connect to "localhost:25"
Collapse
4: Re: Search and OpenFTS (response to 1)
Posted by Dave Bauer on
James:

Ok :) What packages do you have installed besides the base packages. That is which packages contain content that you are searching for? On a base install there isn't anything to search.

On the email error. Take a look around the log and see if you can figure out which tcl proc is causing the error.

Collapse
14: Re: Search and OpenFTS (response to 4)
Posted by James Bennin on
For the mail error, I think the error is comes from the file acs-mail-lite-procs.tcl under
"/web/service0/packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl".
This package was installed as a dependent of the bug-tracker package.  It seems like it's trying to connect to localhost at port 25.  Is there a way I can reconfigure this out so the mail can get out to it's proper recipients?

Thank you

James

Collapse
5: Re: Search and OpenFTS (response to 1)
Posted by James Bennin on
Again, thank you for your answers.  You are really helping me out.  So far the packages installed are bug-tracker and its dependent packages and that is pretty much it. (other than openfts and search).

Thank you

James

PS:  Also I understand to create a web page you need three files: -.adp, -.tcl, -.xql.  I wrote my queries and wrote my tcl script but the variables I passed in to the adp are not working right.  Are the files supposed to be compiled automatically?
These are my different scripts:

<pre>

<master>
<property name="title">Congratulations</property>
<p>Today's date is @date@ and the time is now @time@</p>

</pre>

<pre>
ad_page_contract {
    Main view page for one project.

    @author jsb88@stlife.byu.edu
    @creation-date 2003-08-14
    @cvs-id $Id$

}

-properties {
    date:onevalue
    time:onevalue

}

db_1row date_select {}

db_2row time_select {}

</pre>

tcl file

<pre>

<?xml version="1.0"?>
<queryset>
  <fullquery name="date_select">
    <querytext>
        SELECT current_date;
    </querytext>
  </fullquery>

  <fullquery name="time_select">
    <querytext>
        SELECT current_time;
    </querytext>
  </fullquery>
</queryset>

</pre>

xql file

Collapse
6: Re: Search and OpenFTS (response to 1)
Posted by James Bennin on
These files are contained under /web/service0/www/.

Thank you

James

Collapse
7: Re: Search and OpenFTS (response to 1)
Posted by Dave Bauer on
James,

Bugtracker isn't searchable, so you won't get any search results.

If you add a new XQL file under /web/service/www it will not be reloaded. You will need to restart AOLserver to load the xql queries into OpenACS.

Collapse
8: Re: Search and OpenFTS (response to 7)
Posted by James Bennin on
Thanks a lot for all your answers.  I know I'm asking one too many questions.  I have already tried to restart the server but still there are no changes.  Was there anything wrong with my coding?  What am I doing wrong?
Collapse
9: Re: Search and OpenFTS (response to 7)
Posted by James Bennin on
What is an object?  How do I load in the database?

Thank you

James

Collapse
10: Re: Search and OpenFTS (response to 1)
Posted by Michael Bluett on
I think what Dave is trying to say is that you won't find anything as Bug Tracker is not searchable.  The search doesn't search the pages on the site, but the content in packages that have been designed to be searchable.  I'm not sure which packages are searchable, but I'd have thought general comments and forums would be searchable.  So you might want to install these packages, enter some content (start a thread/write a comment) and search for it.
Collapse
11: Re: Search and OpenFTS (response to 10)
Posted by Tilmann Singer on
> What is an object?  How do I load in the database?

The answer to this can be found here: http://openacs.org/doc/openacs-4-6-3/tutorial.html

Also note that if you are getting started and only want to experiment with the system it is easier to use inline queries instead of putting them in xql files, which is only necessary when you plan to make your code multi-database aware.

Collapse
12: Re: Search and OpenFTS (response to 11)
Posted by James Bennin on
Thank you for your response. I understand that the xql files need to be reloaded. I also know that for certain packages, you need to put certain files on "watch". I tried developping some test script under the "notes" package under "/web/service/packages/notes". I wrote my scripts and I put them on "watch". When I tried to access that page this is the error I got:
invalid command name "-properties"
    while executing
"-properties {

    date:onevalue
    time:onevalue
    
}"
    ("uplevel" body line 13)
    invoked from within
"uplevel {
    	  ad_page_contract {
    Main view page for one project.

    @author James Bennin (jsb88@stlife.byu.edu)
    @creation-date 2003-08-14..."
    (procedure "code::tcl::/web/service0/packages/notes/www/testing" line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	$handler
      } ad_script_abort val {
	# do nothing
      }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	rp_serve_abstract_file "$root/$path"
	set tcl_url2file([ad_conn url]) [ad_conn file]
	set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..."

I am thinking my tcl is wrong.
ad_page_contract {
    Main view page for one project.

    @author James Bennin (jsb88@stlife.byu.edu)
    @creation-date 2003-08-14
    @cvs-id $Id: testing.tcl,v 1.1.1.1 2003/14/08 12:46:56 service0 Exp $

} {
    {one_user_id:integer,optional}
}

 -properties {

    date:onevalue
    time:onevalue

}

db_1row date_select {}
db_1row time_select {}

ad_return_template
What is the format(basic) of writting these tcl scripts? Is there a way to put the files under "/web/service/www/" under "watch" or I just have to reload the server everytime? Thank you James
Collapse
13: Re: Search and OpenFTS (response to 1)
Posted by Dave Bauer on
James,

You can only "watch" files under a package.

If you look at your tcl code you can see that the -properties  designation is at the beginning of a line. You should refresh yourself on how Tcl works to get a better understanding of these types of errors. The -properties switch to ad_page_contract needs to come right after the } of the previous section of ad_page_contract like this:

ad_page_contract {
    Documentation
} {
    query
    variables
} - properties {

}

Collapse
15: Re: Search and OpenFTS (response to 1)
Posted by Dave Bauer on
James,

Check the aolserver config file for the MailHost parameter and change it to whatever SMTP server you use to send outgoing mail.

Collapse
16: Re: Search and OpenFTS (response to 15)
Posted by James Bennin on
I think I have found the file you've been talking about. I think it is the "sample-config.tcl" file. I have also read some the aolserver documentation and found some files about configuration. In that specific file the line for configuring the mail was written as such:
ns_param   mailhost        smtp.yourcompany.com ;# SMTP host for ns_sendmail

So I replaced it with "sendmail" since that is the SMTP we are using.

ns_param   mailhost        sendmail;# SMTP host for ns_sendmail

But I am still getting some errors.
Collapse
17: Re: Search and OpenFTS (response to 16)
Posted by Jarkko Laine on
James,

Sendmail is not your smtp host, it's the mail server program used _on_ your host. SMTP host means the address of your server, something like smtp.ourdomain.com. In most cases it's "localhost" if you're not using a different server for mail handling. Please try that and let us know if it works.

Collapse
18: Re: Search and OpenFTS (response to 17)
Posted by James Bennin on
Thank you for trying to help me out. I tried every different parameter name possible from localhost to my ip address, and even smtp.mycompany.com (of course I replaced it with the real name), and I still get the
[2426.147467][-sched:8-] Error: ns_sendmail failed: could not connect to "localhost:25"
I am doing the modification under the sample-config.tcl file found on the "/usr/local/aolserver/" folder. Is it the right file? What else should I do?
Collapse
19: Re: Search and OpenFTS (response to 18)
Posted by Tilmann Singer on
You need to find out which smtp server your system is able to use for sending email, and then set the parameter accordingly. Most linux installations have one running locally, but maybe you don't - what's the setting for smtp server in your mail program, in case you use one on that machine?

You can also try to connect to the mailserver from the commandline with something like this:

tils@tp:~$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 tils.net ESMTP
If you don't get a response like the one above than most likely there is no mailserver running on that system.

I hope that makes at least a bit sense.

Collapse
20: Re: Search and OpenFTS (response to 18)
Posted by Jarkko Laine on
hmmm... the right file is the one you are referencing to when you launch aolserver. It doesn't matter that much where it lies, you just have to point nsd to read that file when you start it.

Regarding your error, do you have an MTA (like sendmail) listening to 25 on your box?

Collapse
21: Re: Search and OpenFTS (response to 18)
Posted by Joel Aufrecht on
I'm not sure where this thread switched from search to email. However, one thing to test is that you have a mailserver running. One way to do that is telnet localhost 25. If you get a connection(
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 localhost ESMTP
) then you can try HELO and it should answer 250 localhost. None of this has anything to do with OpenACS. If you can't get this far, then the problem is with the mail program, not OpenACS.
Collapse
22: Re: Search and OpenFTS (response to 1)
Posted by James Bennin on
Well thank you for all your response.  I tried to telnet commands and I did not get anywhere.  I received a bunch of "Connection refused".  I figured I have no mail server running on this machine, and if I do, then for security reason it does not accept telnetting. So Joel is right, this problem is not with OpenACS and hence diverged the original course of this thread.

THank you

James