Closed
Bug 470378
Opened 17 years ago
Closed 17 years ago
New search stopwords can't be changed on production
Categories
(support.mozilla.org :: Knowledge Base Software, task)
support.mozilla.org
Knowledge Base Software
Tracking
(Not tracked)
RESOLVED
FIXED
0.8.1
People
(Reporter: nkoth, Assigned: ecooper)
Details
(Whiteboard: sumo_only)
Attachments
(1 file, 3 obsolete files)
|
1.27 KB,
patch
|
nkoth
:
review+
|
Details | Diff | Splinter Review |
On http://support.mozilla.com/tiki-admin_newsearch.php?admin=stopwords, it is not possible to add/remove stopwords (or to see existing stopwords for that matter).
The current stopwords are: a firefox he she the we
The reason for this problem is because /usr/local/sphinx/index/stopwords.txt is only on the subset of sphinxd webheads.
The prefered solution to this in my opinion is to refactor to put stopwords in the database instead, or alternatively in some shared space. (usr/local/sphinx/index is not on shared space right now in case of performance issues with Netapp - hypothetical, not known for sure if there are any)
Updated•17 years ago
|
Assignee: nobody → nelson
Comment 1•17 years ago
|
||
I would probably recommend putting them in the database.
| Reporter | ||
Updated•17 years ago
|
Assignee: nelson → smirkingsisyphus
| Assignee | ||
Comment 2•17 years ago
|
||
Attachment #355694 -
Flags: review?(nelson)
| Assignee | ||
Comment 3•17 years ago
|
||
I followed the basic schema for the other se tables for this table.
Attachment #355696 -
Flags: review?(nelson)
| Assignee | ||
Updated•17 years ago
|
Attachment #355696 -
Flags: review?(laura)
| Assignee | ||
Updated•17 years ago
|
Attachment #355694 -
Attachment is obsolete: true
Attachment #355694 -
Flags: review?(nelson)
| Assignee | ||
Updated•17 years ago
|
Attachment #355696 -
Attachment is obsolete: true
Attachment #355696 -
Flags: review?(nelson)
Attachment #355696 -
Flags: review?(laura)
| Assignee | ||
Comment 4•17 years ago
|
||
stopwords has to be a file apparently.
http://www.sphinxsearch.com/docs/current.html#conf-stopwords
| Assignee | ||
Comment 5•17 years ago
|
||
IT will need to update the sphinx.conf so it points to the correct location for the stopwords (scripts/sphinx/stopwords.txt).
Attachment #355704 -
Flags: review?(nelson)
| Assignee | ||
Comment 6•17 years ago
|
||
Comment on attachment 355704 [details] [diff] [review]
Save stopwords to scripts/sphinx
>Index: tiki-admin_newsearch.php
>===================================================================
>--- tiki-admin_newsearch.php (revision 21446)
>+++ tiki-admin_newsearch.php (working copy)
>@@ -302,7 +302,7 @@
> }
> elseif(isset($_GET['admin']) && $_GET['admin']=='stopwords')
> {
>- $stopwords = file_get_contents('/usr/local/sphinx/index/stopwords.txt');
>+ $stopwords = file_get_contents('../scripts/sphinx/stopwords.txt');
> $stopwords = explode(' ',$stopwords);
>
> if(isset($_GET['remove']))
>@@ -311,7 +311,7 @@
> $removed = $stopwords[$remove];
> unset($stopwords[$remove]);
> sort($stopwords,SORT_STRING);
>- file_put_contents('/usr/local/sphinx/index/stopwords.txt',trim(implode(" ",$stopwords)));
>+ file_put_contents('../scripts/sphinx/stopwords.txt',trim(implode(" ",$stopwords)));
> header('Location: tiki-admin_newsearch.php?admin=stopwords&removed='.urlencode($removed));
> }
> if(!empty($_POST['stopword']))
>@@ -321,7 +321,7 @@
> {
> $stopwords[] = $stopword;
> sort($stopwords,SORT_STRING);
>- file_put_contents('/usr/local/sphinx/index/stopwords.txt',trim(implode(" ",$stopwords)));
>+ file_put_contents('../scripts/sphinx/stopwords.txt',trim(implode(" ",$stopwords)));
> header('Location: tiki-admin_newsearch.php?admin=stopwords&added='.urlencode($stopword));
> }
> }
| Assignee | ||
Comment 7•17 years ago
|
||
Patch uses the correct relative path of ../scripts/sphinx/stopwords.txt now.
I also learned what the Edit Attachment as Comment button does.
Attachment #355704 -
Attachment is obsolete: true
Attachment #355709 -
Flags: review?(nelson)
Attachment #355704 -
Flags: review?(nelson)
| Reporter | ||
Comment 8•17 years ago
|
||
Comment on attachment 355709 [details] [diff] [review]
Using the proper path now
in r21447/r21448. Note also that I added scripts/sphinx/stopwords.txt.dist which should be deployed to scripts/sphinx/stopwords.txt and set read/writable by apache
Attachment #355709 -
Flags: review?(nelson) → review+
| Assignee | ||
Comment 9•17 years ago
|
||
Marking this as resolved, but this won't be able to be verified to after push since it's a production-only bug.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•