Welcome! Log In Create A New Profile

Advanced

Limiting search by a directory

Posted by RobertInfo 
Limiting search by a directory
March 11, 2014 03:14PM
Hi,

I'm a Sphider newbie trying to solve the following problem.

My website contains documentation (in o form of a set of HTML files) for different versions of the same product. Each version of the docs is placed in a different directory. For example

/docs/product/1_0 - contains a set of HTML files for version 1.0
/docs/product/1_2 - contains a set of HTML files for version 1.2
/docs/product/2_1 - contains a set of HTML files for version 2.1

Now, I would like my search page to contain a dropdown where the user can select a version of the docs that their are interested in. So when the 1.2 version is selected, Sphider should only return results matching the query for files placed in the /docs/product/1_2 directory. How can I do it?

Best regards,
Robert
Tec
Re: Limiting search by a directory
March 12, 2014 04:39PM
Could be done by means of
- 'URL Must include' option
and
- Categories

Add your site URL several times into the Admin backend of your Sphider. In 'Advanced options' add to each URL one of your folder names likewise
1_0
1_2
2_0
etc.
Additionally define categories, name them like 1_0, 1_2, 2_0, etc.
Now index all the URLs. As result, only one category will be indexed for each URL.

Afterwards, in result listing, the user of your search engine may select a category to limit the presented search results to one subset (folder) of your site.

Tec
Sorry, only registered users may post in this forum.

Click here to login