OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Indexing numbers for 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.

Indexing numbers for search

Postby michal » Thu Jun 28, 2007 5:00 pm

Guys,
I noticed that you chose not to index numbers as search keywords (in the search keyword index table). Was there any particular reason for this decision?
Thanks,
Michal
michal
 
Posts: 2
Joined: Thu Jun 28, 2007 4:57 pm

Postby asmecher » Fri Jun 29, 2007 6:54 pm

Hi Michal,

There's nothing specifically excluding numbers, except that they're often shorter than the minimum index length (see config.inc.php in the [search] section under min_word_length).

Regards,
Alec Smecher
Public Knowledge Project Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 7746
Joined: Wed Aug 10, 2005 12:56 pm

Indexing numbers

Postby michal » Sat Jun 30, 2007 9:25 pm

I could be horribly wrong here but method filterKeywords (not 100% sure if it is used in the indexing process itself) in SearchIndex.inc.php on line 107 seems to be stripping numbers from a search query - after I removed the is_number() condition from it and rebuilt the index I got all my numbers indexed (eg. a year in a title) previously they did not appear to be indexed at all.
Thanks,
Michal

in SearchIndex.inc.php
line 107 (approx) if (!isset($stopwords[$k]) && String::strlen($k) >= $minLength && !is_numeric($k))
michal
 
Posts: 2
Joined: Thu Jun 28, 2007 4:57 pm

Postby asmecher » Mon Jul 02, 2007 12:31 pm

Hi michal,

My mistake -- that's correct. Moving the is_numeric condition will cause numbers to be indexed.

Regards,
Alec Smecher
Public Knowledge Project Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 7746
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

cron