PDA

View Full Version : Totally Limiting Searches to a Particular Filetype


elroy
11-17-2005, 11:51 PM
Hi all,

I know that this (or similar) question has been asked before, however after searching these forums a number of times, I can't seem to find an instance where the question (or similar) has been answered.

I'd like to know if it is possible (and how) to configure PhpDig to index/search ONLY nominated file types (jpg, gif, png) and to have search results shown as a link to the file.

For example, if a user searches for "flowers" and the resulting 'hits' direct the user to the URL for the file, eg: h++p://www.whatever.com/image/pretty_flowers.png

Any assistance here would be greatly appreciated, thank you.

~ elroy

Charter
11-18-2005, 02:52 AM
PhpDig indexes text, but files such as jpg, gif, png, etcetera contain no 'real' text to index. It sounds like you are looking for an image indexer. If so, PhpDig is not that type of indexer, though you may be interested in the following threads:

http://www.phpdig.net/forum/showthread.php?t=941
http://www.phpdig.net/forum/showthread.php?t=279

elroy
11-18-2005, 03:43 AM
Thanks for the reply,

Neither of those have much to do with what my question is really about - I don't want to create thumbnails of indexed pages, I want to create the ability to have the search results return ONLY results that match the users search 'request' in the name of a specific filetype.

By this, I mean that if the file type that I (as site admin) choose to limit the search to is (for example) .avi and the user searches for "Cars" their results will be along the lines of "fast_cars.avi", racing_cars.avi", "cars.avi", "How_to_fix_cars.avi" etc

I apologise if I'm not making my request very clear and greatly appreciate your assistance.

~ elroy

Charter
11-18-2005, 04:49 AM
Yep, I understood but thought thumbnails may be of interest given you first mentioned image types. ;)

PhpDig is a text indexer, not a file type indexer, and what you're asking is outside of what PhpDig does. For example, seach hamlet (http://www.phpdig.net/demo/search.php?query_string=hamlet) and get results, but search hamlet.doc (http://www.phpdig.net/demo/search.php?query_string=hamlet.doc) and get no results, meaning that file type is not a part of what PhpDig can do, as PhpDig searches keywords from a document.

elroy
11-18-2005, 04:59 AM
ok, thanks for your time Charter.

~ elroy