At 11:07 PM 06/11/01 -0700, Stefan Bergstrand wrote:
>Would it be a bad idea to make it possible to pass properties on the
>commandline when indexing?
It's not too bad an idea. Normally you wouldn't want to store a property
for an index that's the same for every file, but you are merging lots of
indexes so the result is that you can identify which index a result comes
from, and sort by the index.
There's a number of work arounds:
One thing you can do (at least with 2.1-dev) is say:
And if your documents are organized by path, then you can limit your
searches by words in the path:
swish-e -w 'internet AND swishdocpath=domestic'
They can be sorted by path, too.
If you don't merge and instead just list all the index files with -f they you
can also just only select which indexes to search and, again, use -s
swishdbfile to group the results by index.
Another option is to use -S prog and add on a property to the head of the
document when indexing. I doubt indexing would take any longer with this
Lastly, you can use perl or sed to search and replace all the docs, which
may or may not be acceptable in your case.
>I realize that this would be useless when you index all (or large
>parts) of a site by just a few runs, but in my case the site consists
>of thousands of articles (one index each, one or a few HTML-files per
>article) which are merged into larger indexes based on in which
>department they are published.
How many different indexes are you generating? Are you generating separate
indexes so that you don't have to reindex everything when just one
department needs to be reindexed?
>By passing properties on the cmdline I could pass a property, "date", for
>example, for each article index and then be able to sort the search
>results in date order.
Will this work?
swish-e -w foo -s swishlastmodified
Received on Tue Jun 12 14:05:57 2001