Search for numbers
Moderator: Thorsten
-
- Posts: 3
- Joined: Mon Jan 23, 2012 4:50 pm
Search for numbers
Searching for numbers doesn't seem to work or maybe it that is normal?
I have an entry of 29304 and 7.0.29304 in same faq article. Also 29304 in faq topic.
If I do a search for 29304 nothing comes up. If I do a search for 7.0.29304 it works.
is there a way to make it search numbers better?
I have an entry of 29304 and 7.0.29304 in same faq article. Also 29304 in faq topic.
If I do a search for 29304 nothing comes up. If I do a search for 7.0.29304 it works.
is there a way to make it search numbers better?
Re: Search for numbers
Hi,
if you search for numbers phpMyFAQ searches for the solution IDs. Every FAQ has an own unique solution ID.
bye
Thorsten
if you search for numbers phpMyFAQ searches for the solution IDs. Every FAQ has an own unique solution ID.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 3
- Joined: Mon Jan 23, 2012 4:50 pm
Re: Search for numbers
So no option at all to also search the articles for numbers? any plug-ins available or anything at all to change?
thank you for responding.
thank you for responding.
Re: Search for numbers
Hi,
not yet, but could be done. Please add your feature request here: https://github.com/thorsten/phpMyFAQ/issues
bye
Thorsten
not yet, but could be done. Please add your feature request here: https://github.com/thorsten/phpMyFAQ/issues
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Search for numbers
Hi,
Got same problem, please is there any solution to patch this while waiting for an update ?
If I understood it well, numeric searches are redirected to solution id field, can we just disable this, and let it search in content field ?
edit:
Solved with this patch:
Everything works perfectly now
Got same problem, please is there any solution to patch this while waiting for an update ?
If I understood it well, numeric searches are redirected to solution id field, can we just disable this, and let it search in content field ?
edit:
Solved with this patch:
Code: Select all
if (is_numeric($inputSearchTerm) && PMF_SOLUTION_ID_START_VALUE <= $inputSearchTerm &&
1 < $faqSearchResult->getNumberOfResults()) {
// Before a redirection we must force the PHP session update for preventing data loss
session_write_close();
if (PMF_Configuration::getInstance()->get('main.enableRewriteRules')) {
header('Location: '.PMF_Link::getSystemUri('/index.php') . '/content' . $inputSearchTerm . '.html');
} else {
header('Location: '.PMF_Link::getSystemUri('/index.php') . '/index.php?content=' . $inputSearchTerm);
}
exit();
}
Re: Search for numbers
doesnt work for me, any ideas ?
tried it as u written, but nothing changes
tried it as u written, but nothing changes
Re: Search for numbers
It wont work if You use only numeric term in search box. For me it worked, since I use it for error codes description, hence for example, "error code 0x25" gives accurate result, plus numeric term also gets highlighted.Sectomy wrote:doesnt work for me, any ideas ?
tried it as u written, but nothing changes
But, if You enter only number, nothing will be returned. This is why I've told it's a patch.
Basically, above posted patch redirects numeric term search into content field in faqdata table, and not the solution_id field.
-
- Posts: 4
- Joined: Mon Sep 24, 2012 9:29 am
Re: Search for numbers
Hello guys, i am new on the forum.legija wrote:Hi,
Got same problem, please is there any solution to patch this while waiting for an update ?
If I understood it well, numeric searches are redirected to solution id field, can we just disable this, and let it search in content field ?
edit:
Solved with this patch:
Everything works perfectly nowCode: Select all
if (is_numeric($inputSearchTerm) && PMF_SOLUTION_ID_START_VALUE <= $inputSearchTerm && 1 < $faqSearchResult->getNumberOfResults()) { // Before a redirection we must force the PHP session update for preventing data loss session_write_close(); if (PMF_Configuration::getInstance()->get('main.enableRewriteRules')) { header('Location: '.PMF_Link::getSystemUri('/index.php') . '/content' . $inputSearchTerm . '.html'); } else { header('Location: '.PMF_Link::getSystemUri('/index.php') . '/index.php?content=' . $inputSearchTerm); } exit(); }
I have just a quick question, where should i add this code? In which file ?
Thank you so much for the help.
Re: Search for numbers
Hi there,
I´ve tried the patch solution from legija without luck (change done on the search.php file). Any update on that issue? We´re documenting several issues by error number and so on we´re unable to search for them using the error number at all.
I´ve opened as well a change request in github just in case.
Kind Regards,
Joaquín
I´ve tried the patch solution from legija without luck (change done on the search.php file). Any update on that issue? We´re documenting several issues by error number and so on we´re unable to search for them using the error number at all.
I´ve opened as well a change request in github just in case.
Kind Regards,
Joaquín
Re: Search for numbers
Hi,
we'll fix that via Github issue, thanks for that.
bye
Thorsten
we'll fix that via Github issue, thanks for that.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist