PDA

View Full Version : Specific Directory Search


kh44na
03-31-2004, 09:33 PM
Hello There,

I have been reading things regarding this issue throughout the forum, and people have instructed how you can make phpdig search "one directory only" and exclude all other directories.

HOWEVER, what if i have a bit site with say 5 sections. I want phpdig to be able to search ALL these directories (but at the command of the visitor only).

Lets say we have visitor 1 who wants to search section 3 ONLY, can I implement an option that allows him to do so? And les say visitor 2 wants to search section 5 only, and visitor 3 wants to search section 1 only. Can I implement something like this on my website?

I was thinking of giving users the option to "select from a pull down menu" which section they want to search? Is this possible? I'm not an experienced programmer (I'm a designer), but I would really like to do something of this nature.

Your help would be GREAT, and I would like to thank you in advance. I look forward to hearing your expertise :D

Best Regards

synnalagma
04-01-2004, 12:50 AM
There's an option to limit the search to specific path. You must set a field name 'site' wich has to match an id of PHPdig site indexing.

Say you have indexed
www.mysite.com/texts/ id==1
www.mysite.com/exemple/ id==2
etc.

If you only want to search in texts define site=1

Check your database to see id's.

Another solution is to write a php script wich look throught the results array and keep only valid entries. Note that can have best results with less than 100 rank.

Hope that was clear (I don't have very fluent english)

kh44na
04-01-2004, 05:36 AM
Originally posted by synnalagma
Say you have indexed
www.mysite.com/texts/ id==1
www.mysite.com/exemple/ id==2
etc.

If you only want to search in texts define site=1
[/B]

I understand that id=1 means /texts and id=2 is equal to example. But where do I find these IDs again? Sorry?

Also, do I have to make any coding updates to "certain pages" in order to tell phpdig to search only certain directories?

Charter
04-01-2004, 05:52 AM
Hi. Check out this (http://www.phpdig.net/showthread.php?threadid=580) thread.