OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Keyword Search

Open Harvester Systems support questions and answers, bug reports, and development issues.

Moderators: jmacgreg, michael, John

Forum rules
Developer Resources:

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome.

Keyword Search

Postby bdgregg » Tue Feb 17, 2009 3:12 pm

Alec,

A user of our service has asked why if you perform a simple search "Kutztown postcard" {without quotes} does the system return no results where as if you search just "Kutztown" it returns results as well as "postcard" and the results for one also include the other so it should be find both "Kutztown" and "postcard". Is there something that I'm missing somewhere in a configuration file somewhere that has turned this off or maybe a patch that would fix this?

Here's our site: http://padl.pitt.edu/index.php/index

Thanks,
Brian Gregg.
bdgregg
 
Posts: 117
Joined: Wed Sep 15, 2004 8:21 am
Location: University of Pittsburgh

Re: Keyword Search

Postby asmecher » Tue Feb 17, 2009 5:48 pm

Hi Brian,

Try patching against bug #3985 (http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=3985) -- let me know whether that solves the problem.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: Keyword Search

Postby bdgregg » Wed Feb 18, 2009 5:34 am

Alec,

I added the extra = sign to the Search.inc.php and cleared both template and data caches as well as restarted the web server with no change in the search results.

Do you have any other thoughts or patches? ;-)

Thanks,
Brian.
bdgregg
 
Posts: 117
Joined: Wed Sep 15, 2004 8:21 am
Location: University of Pittsburgh

Re: Keyword Search

Postby asmecher » Wed Feb 18, 2009 11:07 am

Hi Brian,

Before I debug any further, try running tools/rebuildSearchIndex.php -- let me know if that works, but if not, I can help you to investigate further in the database.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: Keyword Search

Postby bdgregg » Thu Feb 19, 2009 11:32 am

Alec,

Rebuilt the search index (took a while >100,000 records)...

Still no change in results. I see both keywords in the database...
Code: Select all
mysql> select keyword_id,keyword_text from search_keyword_list where keyword_text='postcard';
+------------+--------------+
| keyword_id | keyword_text |
+------------+--------------+
|     971123 | postcard     |
+------------+--------------+
1 row in set (0.00 sec)

mysql> select keyword_id,keyword_text from search_keyword_list where keyword_tex
t='kutztown';
+------------+--------------+
| keyword_id | keyword_text |
+------------+--------------+
|    1138516 | kutztown     |
+------------+--------------+
1 row in set (0.00 sec)


Can I check anything else?

Thanks,
Brian.
bdgregg
 
Posts: 117
Joined: Wed Sep 15, 2004 8:21 am
Location: University of Pittsburgh

Re: Keyword Search

Postby asmecher » Thu Feb 19, 2009 12:23 pm

Hi Brian,

Try the following query:
Code: Select all
SELECT l.keyword_text, o.object_id, o.record_id, o.raw_field_id FROM search_object_keywords k, search_objects o, search_keyword_list l WHERE (l.keyword_text = 'kutztown' OR l.keyword_text = 'postcard') AND l.keyword_id = k.keyword_id AND k.object_id = o.object_id;
(I hopefully haven't missed a join; you shouldn't get too many rows. If you do, try adding an "AND o.record_id = 1234" to the end, where 1234 is the record_id you expect to match but aren't getting in the results.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: Keyword Search

Postby bdgregg » Thu Feb 19, 2009 1:14 pm

Alec,

I am getting results...
Code: Select all
mysql>     SELECT l.keyword_text, o.object_id, o.record_id, o.raw_field_id FROM search_object_keywords k, search_objects o, search_keyword_list l WHERE (l.keyword_text = 'kutztown' OR l.keyword_text = 'postcard') AND l.keyword_id = k.keyword_id AND k.object_id = o.object_id and o.record_id='179313';
+--------------+-----------+-----------+--------------+
| keyword_text | object_id | record_id | raw_field_id |
+--------------+-----------+-----------+--------------+
| kutztown     |   7654166 |    179313 |           28 |
| kutztown     |   7654170 |    179313 |           29 |
| kutztown     |   7654170 |    179313 |           29 |
| kutztown     |   7654171 |    179313 |           32 |
| kutztown     |   7654174 |    179313 |           35 |
| postcard     |   7654166 |    179313 |           28 |
| postcard     |   7654166 |    179313 |           28 |
| postcard     |   7654166 |    179313 |           28 |
| postcard     |   7654166 |    179313 |           28 |
| postcard     |   7654166 |    179313 |           28 |
| postcard     |   7654171 |    179313 |           32 |
+--------------+-----------+-----------+--------------+
11 rows in set (0.63 sec)


Thanks again, anything else?

Brian.
bdgregg
 
Posts: 117
Joined: Wed Sep 15, 2004 8:21 am
Location: University of Pittsburgh

Re: Keyword Search

Postby asmecher » Thu Feb 19, 2009 7:26 pm

Hi Brian,

OK, this confirms that the index has been correctly generated; could you turn on the "debug" option in config.inc.php (which will result in a lot of debug info appearing on every request!), perform the search for "kutztown postcard" (no quotes), and post the resulting dump here (removing anything you think might be private)?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm


Return to Open Harvester Systems Support and Development

Who is online

Users browsing this forum: No registered users and 1 guest