The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#141
|
|||
|
|||
Quote:
What I have done is set the warning messages off assert_options(ASSERT_ACTIVE, 0); // 0 off or 1 on in sphinxapi.php As far as I can see the assert errors are generated because the asserts all check to see if things are integers and some of the input defaults are either text strings numerics or text strings. These warnings don't seem to effect the output which seems to work pretty well. But with some of the more complex searches it is possible to produce array warning errors ie Warning: in_array() [function.in-array]: Wrong datatype for second argument in /includes/sphinx.php on line 125 The line there looks like if (!can_moderate($docinfo[$sphinx_forumid_group]) AND i n_array($docinfo[$sphinx_userid_group], $Coventry)) So this warning implies that one of the items is the wrong datatype - checking back through the code on line 34 and 50 these are set to: $sphinx_forumid_group = 'group'; $sphinx_switch_group = 'group2'; //threadid $sphinx_userid_group = 'group3'; Is this the issue? Should they be numeric? For anyone interested this is now live at: www.digitalspy.co.uk/forums/ We have 11,158,584 Posts and 464,239 Threads. And the main data file is a little over 4Gb in size. It is still a work in progress but it does seem to produce the correct results Quote:
I'm not sure if this is an issue between 3.0.x and 3.5/3.6 but thought I would share my thoughts on this as it kept me on my toes and I now have a much better understanding of the way the code works PS the docinfo[$spinx????] elemets turn the group defaults into numerical output as required. I'm still not sure why the assert errors are being seen though will delve deeper PPS Well after more searching and playing I am no further forward as to why the assert warning errors are occuring. Trying to force the elements to be integers with intval breaks the code so I am now with a system that seems to work but generates warning errors that I have switched off. I assume no one using 3.6 is having these issues with these assert warnings? |
#142
|
|||
|
|||
Why does intval() break any code?
And maybe the $Coventry variable is something else in vB 3.0... I'm really sorry I can't be of any further assistance here but I'm not running vB 3.0 |
#143
|
|||
|
|||
Quote:
$sphinx_groups2 = $sphinx_userids; to $sphinx_groups2 = intval($sphinx_userids); Seemed to cause odd behaviour. I was also seeing if using it in: if (!empty($userids)) $sphinx_userids = explode(',', $userids); else $sphinx_userids = array(); if ($forumchoice != '') $sphinx_groups = explode(',', $forumchoice); But wasn't sure I could use it in this context. My problem is that not entirely understanding the logic of what is going on here (but learning as I go along). I'm not sure why I am seeing the "Warnings" yet they generate perfect results. Depending on the results each of the elements "SetGroups" "SetGroups2" SetGroups3" generate these warning errors but because these are arrays I need to build the array with integers and I assume not numerics that are text(?) Quote:
Quote:
I assume you don't see any of the assertion errors in vB 3.6 ? Anyway as you can see (if you register on our site) the Sphinx search does work and very smoothly and quickly and great solution to off looading the search function out of the main database. One final question. Everything runs very quickly and smoothly except one search "Find Threads Started by User" which is extremly slow. Do you have the same problem with 3.6? |
#144
|
|||
|
|||
Quote:
---- Found my way here via the Big Boards Thread on vB.com - wow - I'm going to get on this right away! We're moving from a heavy modded 6.5+ million post vB2 to 3.6 in the coming weeks and for over a year now we've survived only because our search was split up into separate tables according to date range - updated nightly - and stored on another drive, but with 'Search this Thread', 'View New Posts' and 'Find all posts by User' acting on the live post table. |
#145
|
|||
|
|||
Quote:
Quote:
The solution? Don't search for the common words, it won't do any good in any case. Or better, narrow your search by adding more specific keywords. |
#146
|
|||
|
|||
Quote:
|
#147
|
|||
|
|||
Quote:
Quote:
Overall it has been running now for a week and once we sorted a few things out it has been excellent and using your cool current and DELTA index the databases are updated every 15 minutes and the whole site reindexed every night. Thanks for the ideas this has been an excellent tool and remarkably easy to implement. |
#148
|
|||
|
|||
function intvalArray(&$item, $key)
{ $item = intval($item); } array_walk($array, "intvalArray"); untested, but that's the idea. Glad to hear it works for you! |
#149
|
||||||
|
||||||
Quote:
Quote:
Maybe you have some ideas on the issues: morphology = none stopwords = min_word_len = 3 charset_type = sbcs } What do morphology and stopwords do / offer and how to best use them. and mem_limit = 256M } mem_limit for creating the index anyone have any views as to sensible optimum answer for this we are running this on a machine with 8Gb of RAM and as it started as 32M I didn't want to make it too big but it still complains it could be better ============== Looking in the original configuration file I think I have a handle on the morphology, word_len and char set. Would I be right in saying that the stopwords file is a list of words NOT to index? If so does anyone have a good list of 2 and 3 letter words that can happily be removed from an index ============== Looking on the sphinxsearch forums there is discussion on creating stop words and the indexer can produce list of most used words for you to work with ie /usr/local/bin/indexer --config sphinx.conf --rotate --buildstops sphinx-stop.txt 1000 --buildfreqs This builds a file with the most commonly used words in the index and the frequencythat they are in your index. If I understand this correctly it should allow you to remove a few of the obvious things. Quote:
Looking at the code in sphinx.php: Code:
if ($titleonly) { // searching thread titles $sphinx_index = $sphinx_thread_index_name; $sphinx_groups2 = $sphinx_userids; $sphinx_forumid_group = 'group'; $sphinx_switch_group = 'group3'; //firstpostid $sphinx_userid_group = 'group2'; // only titles, nothing to weight $sphinx_weights = array ( 1 ); } As far as I can tell one needs the results of the various items above to be so processed. or do you implement it: Code:
$cl = new SphinxClient (); $cl->SetServer ( $sphinx_server, $sphinx_port ); $cl->SetWeights ( $sphinx_weights ); // $cl->SetLimits ( 0, $vboptions['maxresults'] ); $cl->SetLimits ( intval(0), intval($vboptions['maxresults']) ); $cl->SetMatchMode ( SPH_MATCH_ALL ); $cl->SetGroups ( $sphinx_groups ); $cl->SetGroups2 ( $sphinx_groups2 ); $cl->SetGroups3 ( $sphinx_groups3 ); $cl->SetGroups4 ( $sphinx_groups4 ); $cl->SetGroups5 ( $sphinx_groups5 ); $cl->SetSortMode ( $sphinx_sort ); $cl->SetGroups4 ( (array_walk( $sphinx_groups4, "intvalArray") ); I assume it doesn't matter that sometimes the array will be one element long. ===================================== Quote:
Is there a reason you didn't code that using Sphinx? |
#150
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|