News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Search only specific board(s)

Started by adrianbj, December 14, 2009, 11:29:13 AM

Previous topic - Next topic

adrianbj

Hi, I am running 2.0 RC2 and when I try to restrict an advanced search to only one or a few boards, it still returns results from all boards.

Anyone else having this problem?

Thanks,
Adrian

Ben K

SMF 2.0 RC2
Just checked it, there is no such problem.

adrianbj

I just checked on this forum and agree it works fine - is anyone having troubles on their installation or can think of a reason why it might be a problem on mine?


Norv

Moving this topic at Support, as it does not seem to be a bug in SMF.

Please tell what mods you have installed, if any.
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

adrianbj

Norv,

No mods installed. You can take a look at the forum here:
http://ian.umces.edu/discforum/

Thanks

Norv

#5
Please, try to check your error log, and post here what errors you may find. Admin > Logs.

Also, does your theme by any chance have a file named like "Search.template.php" ? (you can see in your theme's directory, ./Themes/your_theme/)
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

adrianbj

The only errors in the log are related to users entering incorrect passwords, or trying to log in before validating their email address - nothing else.

There is no theme specific "Search.template.php", and the one in the default theme folder is dated 11/8/2009.

Norv

Can you please post your ./Themes/default/Search.template.php and ./Sources/Search.php however? Just to be sure, I'd compare them with the standard ones and try to use them eventually to see if I can have the same result.
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

adrianbj

I just downloaded the full install package and updated those two files. Turns out they were dated 11/9/2009 and were actually different sizes. When I update from RC1 I used the update or upgrade (can't recall). Regardless, even with the "new" version of these the search functionality is still not working properly.

I wonder if it would be worth updating all files from the full install package? My admin detailed version info says that all files are up to date, but might be worth it. Could any other files affect the search?


Norv

Quote from: adrianbj on December 17, 2009, 12:26:56 AM
I just downloaded the full install package and updated those two files. Turns out they were dated 11/9/2009 and were actually different sizes. When I update from RC1 I used the update or upgrade (can't recall). Regardless, even with the "new" version of these the search functionality is still not working properly.

I wonder if it would be worth updating all files from the full install package? My admin detailed version info says that all files are up to date, but might be worth it. Could any other files affect the search?

Yes, if files were different, the version should be different too. Still, since you have no mods, re-uploading fresh files can't hurt anything. Except your bandwidth, perhaps. :)

More importantly: might be worth if you go in Admin > Search and check the search settings. Do you by any chance have a custom index defined? If you have any index defined, remove it, then rebuild one, and see if it still happens (fulltext could be okay).
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

adrianbj

I uploaded all the files from the full install package, edited the new Settings.php file and simply deleted the install.php and still the same problem.

I don't have a custom index defined.

Just for the record, I am running PHP 5.2.12 on Linux and MySQL version 5.0.51a


Norv

If you have no index, please try making one?
What are your search settings?
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

adrianbj

Perhaps I should have qualified - there is a fulltext index, just no custom index. As far as settings go, "Force the use of a search index" was unchecked, but checking it makes no difference.

If I look at the messages table in PMA, the body is listed is having a fulltext index and there are a bunch of BTREE indexes.

search_enable_captcha     1
search_floodcontrol_time    5
search_force_index    0
search_index    fulltext
search_pointer    163
search_results_per_page    30
search_weight_age    25
search_weight_first_message    10
search_weight_frequency    30
search_weight_length    20
search_weight_subject    15

Norv

Please remove the index, then try searching, then re-add it.
It will force re-building this 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

adrianbj

I removed, did a search which resulted in an error, and then rebuilt the index and it is back to displaying results from all boards again!

Norv

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

adrianbj

Sorry about that - that is exactly the sort of thing I am normally complaining to my users about.

"The database value you're trying to insert does not exist: id_search"

Thanks again

Norv

It might be useful if there is a file/line too, let us know which they are. They might be in the error log, too.

Just in case: does this happen on the default theme?
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

adrianbj

#18
From the error log:

http://ian.umces.edu/discforum/index.php?action=search2
The database value you're trying to insert does not exist: id_search
Function: PlushSearch2
File: /xxx/xxx/discforum/Sources/Search.php
Line: 1533


Just to clarify, in my copy of Search.php, line 1533 is the closing ")" for:
$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? ( '


Oh yeah, and the default theme has the same problem.

adrianbj

Anyone else have any ideas please?

greyknight17

Is this issue resolved now? I just did a quick search on your site for computer and selected the technical assistance board. It displayed only results from that board.

adrianbj

Nope, still not working. Try searching for "symbol". It brings up the results from many boards.

Thanks,
Adrian

Advertisement: