[opencms-dev] Choose the directory to start the search

Christian Steinert christian_steinert at web.de
Thu Sep 14 13:40:22 CEST 2006


maria.freixes_graells at alcatel.es schrieb:
> Hello everybody!!
>
> This is a question that I made a few days ago, please, if someone has
> an idea to implement this, It would be great!
> The question is that each time I launch a search, always the tool scan
> all the directories in our structure, but I would like an option to
> add into my search, in order to implement the facility to choose the
> directory for starting the search.
>
> Any idea?
>
> Maria
I don't know if you can search only some files of your index. I think
you have to create a separate search index for each section that you
want to make searchable.

Opencms supports this very well:
- You create one index source for each section.
- You combine one or more of these index sources are into a search
index. You can re-use one index source in several search indexes, if you
like.
- Then in your search form you can present a simple drop-down - list,
where the user can select one of the indexes you have defined. The
selected index will tell opencms which search index should be used. The
name of that parameter is "index" and there you just have to set the
name of one of your indexes - as you have named it in the opencms search
configuration.

I hope that this is a bit clear new. I found it a bit indirect when I
defined my own indexes, but if you play around with the search
configuration and try to create some index sources and indexes, I hope
it becomes more clear.

Regards.
christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060914/48c9c46f/attachment.bin>


More information about the opencms-dev mailing list