The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#471
|
|||
|
|||
find the time to look into 3.7 it Jason?
arn |
#472
|
|||
|
|||
From what I've been reading, the Sphinx addon doesn't have the ability to search for posts by user, right? And the only way is to make a new field for a fulltext index?
Well, I'm not sure about Sphinx 0.9.7, but on my own (not vBulletin) site running Sphinx 0.9.8 I was able to replicate every feature of the vBulletin search and then some using only the API calls in the Sphinx PHP API. If someone could summarize what's missing in the vB Sphinx implementation I could possibly help write in the features missing. It really takes some experience to be able to work with Sphinx, the documentation is rather lacking. |
#473
|
|||
|
|||
Quote:
I think I posted a page or so back about it. |
#474
|
|||
|
|||
It is not needed as those searches do not use fulltext index. They use the index on the userid field which exists for both post and thread tables.
|
#475
|
|||
|
|||
It most certainly IS needed. Those searches hurt on big sites, even with the indexes.
|
#476
|
|||
|
|||
One can easily setup the index to grab userids as a filterable attribute in sphinx.conf. I suppose what I'm trying to understand is why one would use a new generated fulltext index on a column with "userid_xxxx" when they could just add it to their integer indexes. I would think the performance on the non-fulltext index would be greater, but I could be wrong.
|
#477
|
|||
|
|||
Quote:
|
#478
|
|||
|
|||
I thought you all that use (and program with) Sphinx might be interested to know that Shodan, the programmer of Sphinx, put up a wiki for the Sphinx community after we cajoled a bit. To show the fruits of that effort, I've written the documentation for the PHP API of Sphinx 0.9.8-r1065 on the wiki. It's a bit more friendly than the comments of sphinxapi.php
http://sphinxsearch.com/wiki/doku.php?id=php_api_docs Most of the methods are valid for 0.9.7, but honestly, 0.9.7 is so outdated by 0.9.8 there's hardly a comparison. There's a lot of methods added in 0.9.8. We haven't got around to updating the actual Sphinx documentation to 0.9.8 yet but it's planned. |
#479
|
|||
|
|||
Xorlev,
Have you replicated the Find all posts by user or Find all threads by user in Sphinx then? I think why they're trying to add a fake keyword is that the search for user's posts/threads normally works by username and not userid. Therefore adding it as a sort field would be impossible as it's not an integer. I understand that links to users' posts/threads from anywhere other than the actual search.php page would then be able to be turned into one based off the userid instead.. But how do you suggest turning the username into a userid on the actual search.php page? I have only just started looking into Sphinx but I certainly have the capability of learning this really quickly so if you or somebody else could chime in that would be great. I'm going to be trying to get Sphinx up on my forum in the next few weeks, but I really wanted to hold off until someone comes up with a solid solution to moving "Find all posts/threads" to Sphinx. On that note.. does this seem to be a good solution? Someone replied in that thread that they had to tweak the search to show actual POSTS and not THREADS, though. Or would using the userid ultimately be a nicer solution? It'd still require running a query (only when searching right from Advanced Search) to grab the username, though, I assume.. but nothing that would be as awful on MySQL as the current username search. |
#480
|
|||
|
|||
Well, lets see here. What I'd do is grab the userid searched by (either by id, or running the through a query and getting it back).
Note: This uses my knowledge of Sphinx 0.9.8. I'm not sure about the limitations of 0.9.7. Show all threads by started by user: PHP Code:
Show all posts by user: PHP Code:
Show all threads posted in by user: PHP Code:
Whatever fuzzy matches were done on the username can be done on the user table and returned. The filter value $userid has to be an array anyways, so we can pass it multiple userids we grabbed from the user table. I'm not entirely familiar with vBulletin's classes and such, but I might give it a try to writing in Sphinx 0.9.8 support. Edit: I just looked back again and reread this: Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|