Opened 12 years ago
Last modified 5 years ago
#619 new enhancement
Omega: Indexing folders
Reported by: | peterpan | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Omega | Version: | git master |
Severity: | normal | Keywords: | GoodFirstBug |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
Reference: http://article.gmane.org/gmane.comp.search.xapian.general/9563
Xapian Omega 1.2.14, does not index folders, but only files. In order to be able to search/find folder by its name, it would be helpful if omega would index it.
Note: I do not propose to index the folder name along every file contained in the respective folder, but I am rather thinking about making the folder itself searchable, so that if a user would search for words included in a folder name, omega would display this folder (not the files contained in the folder) in the result list. (i.e. the url to the folder itself would be in the results list)
I understand that not every user of omega would like to index folders (e.g. if omega is used to index the pages of a website, it is probably not a good idea to provide folders in the result list), but for users using omega to index NAS shares (for example), it makes sense.
Therefore, providing a specific command line switch in omindex to activate this feature would probably be required.
Change History (1)
comment:1 by , 5 years ago
Keywords: | GoodFirstBug added |
---|---|
Version: | 1.2.14 → git master |
A neat way to handle this would be to allow directories to be mapped to mime-type
inode/directory
(which is whatfile --mime-type DIRECTORY
reports) if you want to index them - e.g. withomindex --mime-type=/:inode/directory
(which would need a small adjustment to--mime-type
to handle a/
specially) - and then--filter=inode/directory:true
would take care of indexing directories only by metadata (or you could provide a command if there was some way to extract text given a directory path in your particular situation).#771 is related - for that we want to be able to specify
--mime-type=.key/:application/vnd.apple.keynote
so that a directoryfoo.key
is handled specially.Probably we should support trailing
/
on glob patterns too so--mime-type-match='X*/':inode/directory
should all indexing only directories which startX
, etc.