Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#668 closed enhancement (worksforme)

File/MIME Type Search Filter for Omega

Reported by: bramvdh Owned by: Olly Betts
Priority: normal Milestone: 1.2.21
Component: Omega Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

Would be great if you could search for certain file type or MIME types using omega

Change History (5)

comment:1 by Olly Betts, 10 years ago

Resolution: worksforme
Status: newclosed

It is already great - you can filter by extension or MIME type by passing parameters such as B=Ttext/html or B=Epdf.

See http://xapian.org/docs/omega/overview.html section "Boolean terms" (though I notice that's missing E which was added in 1.2.5 - I'll fix that.

comment:2 by bramvdh, 10 years ago

Resolution: worksforme
Status: closedreopened

Understand, however I was thinking more along the lines of the form interface in the query format, all the search terms go into the P cgi parameter. A kind of google/microsoft style search parameters would be quite nice e.g. searching for "Name:Report Type:pdf " ... or an advanced search interface, with many more parameters... I know I can code it myself if I wanted to, was just wondering if this could be standardized somehow.

comment:3 by Olly Betts, 10 years ago

Resolution: worksforme
Status: reopenedclosed

That's also already supported - e.g. to have type:pdf map to a filter by term Epdf just add this to your query template:

$setmap{boolprefix,type,E}

If you want an advanced search form, you can just use <select> or radio buttons or whatever to generate the B=Epdf. See the documentation for $filterterms for an example of generating one dynamically:

http://xapian.org/docs/omega/omegascript.html

comment:4 by bramvdh, 10 years ago

ok thx, I'll look into it, still might be nice to have some of these options default in the query template

comment:5 by Olly Betts, 10 years ago

Milestone: 1.2.21

Backported fix to document E prefix in [84e3263202e65f9b291d8167cd861d43a0ecf8ed].

Note: See TracTickets for help on using tickets.