News:

Wondering if this will always be free?  See why free is better.

Main Menu

SMF Search cant find things posted why?

Started by sombra, October 17, 2009, 09:08:45 PM

Previous topic - Next topic

sombra

i have notice nad people on my forum that smf search not always find the things posted in the forum somtimes i look for somthing i know i posted and i cant find it from the search from smf a little strange is this normal?

how can i get this search to find anything posted in my forum

smf 2.0 rc1-2

Norv

Please try resetting the search indexes, or building one, if none, in Admin > Search > Search Method.
Remove the index if any (set "no index" and save), then re-create an index ("create a fulltext index").

If you have a very significant number of posts, perhaps try a custom index.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

sombra

thanks for the reply is there a manual or somthing i dont know erally what your talking about hehe can you be more especific im a little lost

Norv

Perhaps this can help: Search

Eventually, go to your Admin > Search > Search Method and make a screenshot with what is says now.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

sombra

#4
ok so full text search is the best option?

do i will need to chek this mark ?
QuoteForce the use of a search index: Checking this will force the use of a search index.

and this option is good to use it?
QuoteMatch whole words only: - Using this will match only full words when searching. An example can be if a post has the word 'strictly' in it. When searching for 'strict' with this option checked, you will not get any results back, but with the option unchecked, you will get results.

i already did a full text index nnow for what i understand i will need to update this often?

is there any way to jump the 1 letter restriction for 3?

Norv

Quote from: sombra on October 19, 2009, 10:00:00 AM
ok so full text search is the best option?
For small to medium-sized forums, I'd say it is rather a good idea.

Quote from: sombra on October 19, 2009, 10:00:00 AM
do i will need to chek this mark ?
QuoteForce the use of a search index: Checking this will force the use of a search index.
Using a search index is generally a good idea for forums when they get a little bigger than new startups. You don't have to, though.

Quote from: sombra on October 19, 2009, 10:00:00 AM
and this option is good to use it?
QuoteMatch whole words only: - Using this will match only full words when searching. An example can be if a post has the word 'strictly' in it. When searching for 'strict' with this option checked, you will not get any results back, but with the option unchecked, you will get results.
You can use "match whole words only" if you want. Do you want to only find the results where the word you search is a full word? Then use it. Or do you want to find all results, where the text you search can be part of a word? Then don't. Please see exactly the example about "strict" and "strictly".

Quote from: sombra on October 19, 2009, 10:00:00 AM
i already did a full text index nnow for what i understand i will need to update this often?
You usually don't need to update the search index yourself, it is updating itself. However, when search doesn't seem to work right, it can help to remove the index, and re-create it.

Quote from: sombra on October 19, 2009, 10:00:00 AM
is there any way to jump the 1 letter restriction for 3?
This has been asked before, it requires a little manual edit in the .php files, though I don't remember exactly where.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

sombra

#6
QuoteQuote from: sombra on Today at 10:00:00 AM

    is there any way to jump the 1 letter restriction for 3?

This has been asked before, it requires a little manual edit in the .php files, though I don't remember exactly where.

someone that knows were and what i need to edit for this to work

and thanks for the replys its been of a lot of help

Norv

Sources/Search.php:
Code (find) Select

// Don't allow very, very short words.
elseif (strlen($value) < 2)
{
$context['search_errors']['search_string_small_words'] = true;
unset($searchArray[$index]);
}

To have a 3-letter limit instead of 1-letter limit:
Code (replace) Select

// Don't allow very, very short words.
elseif (strlen($value) < 4)
{
$context['search_errors']['search_string_small_words'] = true;
unset($searchArray[$index]);
}

Also, the error message should be adapted, for English that is in ./Themes/default/languages/Errors.english.php:
Code (find) Select

$txt['error_search_string_small_words']

Instead of 'Each word must be at least two characters long.' the message should be changed to 'Each word must be at least four characters long.'.
The same for other languages, for example for Spanish, the same should be done in a file like ./Themes/default/languages/Errors.spanish.php.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: