[Xapian-discuss] excluding child folders in omindex search
Peter Karman
peter at peknet.com
Fri Dec 17 03:36:04 GMT 2010
Jeff wrote on 12/15/10 11:36 AM:
> hi there,
>
> is there an option to exclude child folders when running omindex?
>
> For example:
>
> omindex -p --db /var/blah/default --url /something /var/www --exclude
> /var/www/ignore
>
Swish3 with the Xapian backend can do this, using the FileRules config
directive. The indexing layout in Swish3 for field prefixes is not exactly like
omindex's though, so I don't think they're 100% compatible. But as an example:
[karpet at pekmac:~/tmp/skip]$ cat conf
FileRules directory is skipme
FileRules directory is index.swish3
[karpet at pekmac:~/tmp/skip]$ tree
.
|-- conf
|-- incme
| `-- seeme.xml
`-- skipme
`-- donotindexme.xml
2 directories, 3 files
[karpet at pekmac:~/tmp/skip]$ swish3 -F xapian -c conf -i .
1 documents in 00:00:02
[karpet at pekmac:~/tmp/skip]$ swish3 -q see
# swish3 version 3.0.8
# Format: Xapian
# Query: see
# Hits: 1
# Search time: 0.0004
1000 incme/seeme.xml ""
.
[karpet at pekmac:~/tmp/skip]$ cat incme/seeme.xml
<doc>
see this
</doc>
[karpet at pekmac:~/tmp/skip]$ cat skipme/donotindexme.xml
<doc>
do not see me
</doc>
--
Peter Karman . http://peknet.com/ . peter at peknet.com
More information about the Xapian-discuss
mailing list