News:

Join the Facebook Fan Page.

Main Menu

Search Results Issue

Started by rbogle, June 28, 2015, 12:54:08 AM

Previous topic - Next topic

rbogle

Folks,

I'm seeing some strange behavior with search for imported messages.

I've imported approx 100 messages using a CSV file and the import went fine.  I ran the admin maintenance tasks and all messages are reflected in the board....The board displays all imported messages and I have multiple pages with 15 messages on each page.

BUT....when I do a search on this board I am only shown 1 page of results regardless of how many results should be displayed.  For example if I search on a words that is found in all 100 posts I am only shown a page of results with the number on that page being the number set in the Number of Search Results Per Page value.....If this is set to 30 I see just 25 results but there is no ability to show the remaining search items.  If I set the Search Results per Page value to 100 then I will see all 100 results since they will all fit on 1 page.

I have another forum that has lots of non-imported messages and the search function displays multiple pages of results so I assume I missed something when doing the import?

I did check the smf_log_search_results db table after doing a search and all messages expected are shown in this log so I assume they were found, just not displayed on the search results form?

Hope this makes sense.....Probably something simple.  Any thoughts would be appreciated.

Kindred

how did you import the messages?   Directly into the database?

If so - that is your issue right there... you should never import directly into the database as there are background things that get done when a message is posted....   you should write a script that calls the CreatePost() function
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

rbogle

Thanks for the info.....I'm an "IT Guy" but I'm not proficient with php (I assume that's what would be used to call the createpost() function)

Kindred

yup...   inserting directly into the database leaves all sorts of things in a bad state...


you will now need to:
re-run the search index
recalculate the forum totals

and I'm still not sure that will resolve the issues... but it will be closer...

and next time, use the function... :)
http://support.simplemachines.org/function_db/index.php?action=view_function;id=323
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: