FAQ

[Xapian-discuss] About search

ธีรเชน ธรรมชัย
Jul 16, 2010 at 4:50 am
Hi,



I have some question in search with xapian.

I added 3 files which there are the same message in each file, but different extensions (e.g. pdf, txt, doc).

So, I search in this database. I found 3 results. And I would like to know:

How can I fillter result in only one extension(e.g. pdf extension) in this search?



Regard

Mr.T

_________________________________________________________________
Hotmail: ?????????????? ?????????????? ???????????????
https://signup.live.com/signup.aspx?id`969
reply

Search Discussions

2 responses

  • Jim at Jul 16, 2010 at 11:46 am

    ?????? ??????? wrote:
    Hi,



    I have some question in search with xapian.

    I added 3 files which there are the same message in each file, but different extensions (e.g. pdf, txt, doc).

    So, I search in this database. I found 3 results. And I would like to know:

    How can I fillter result in only one extension(e.g. pdf extension) in this search?



    Regard

    Mr.T
    One way would be to index the files using the extension as a separate
    field, possibly a boolean term. That way you can limit the search to a
    single or set of extensions.

    Jim.
  • James Aylett at Jul 19, 2010 at 10:40 am

    On 16 Jul 2010, at 12:46, Jim wrote:

    One way would be to index the files using the extension as a separate field, possibly a boolean term. That way you can limit the search to a single or set of extensions.

    Omega indexes the MIME type (with prefix 'T'). Unless you're doing something radically different to Omega overall, I'd recommend using the same term prefixes as it: <http://xapian.org/docs/omega/termprefixes.html>.

    J

    --
    James Aylett
    talktorex.co.uk - xapian.org - devfort.com

Related Discussions

Discussion Navigation
viewthread | post