I am consulting the DB made by omega from PHP, then I need recovery all the
files that are pdf and talk about omega for example, my query is:

$query_string = "mime:pdf/ AND omega";
...
$qp->add_prefix("mime", "T");
...

Then I not receive any results, and have files application/pdf indexed,

Parsed query is: Xapian::Query((Tpdf:(pos=1) AND Zomega:(pos=2)))
0 results found:

Thanks

al.

Search Discussions

  • James Aylett at Nov 14, 2007 at 3:23 pm

    On Wed, Nov 14, 2007 at 10:17:54AM -0500, Aleph Thomas wrote:

    I am consulting the DB made by omega from PHP, then I need recovery all the
    files that are pdf and talk about omega for example, my query is:

    $query_string = "mime:pdf/ AND omega";
    ...
    $qp->add_prefix("mime", "T");
    ...

    Then I not receive any results, and have files application/pdf indexed,
    You won't. The term generated is (or should be) Tapplication/pdf - try
    adding it as a boolean term. add_boolean_prefix not add_prefix? Sorry,
    I know what I mean, but I'm too rushed right now to figure out if this
    is the right approach. But your problem is the construction of the term.

    J

    --
    /--------------------------------------------------------------------------\
    James Aylett xapian.org
    james@tartarus.org uncertaintydivision.org
  • Aleph Thomas at Nov 14, 2007 at 3:33 pm
    You are right, I using boolean and receive, that results, only if I search
    for example mime:pdf not receive any think, I not can make searchs in the
    terms?, for example if I have a title and need search in it?

    thanks

    mime:application/pdf Parsed query is: Xapian::Query(0 * Tapplication/pdf)
    2 results found:
    1: 100% docid74 [url=/strigi-0.5.7/testdata/data/simplepdf.pdf
    sample=This is 12-point Times. This sentence will appear near the top of
    page one. This is 24-point Times, appearing at the middle of page two.
    caption=TwoPage PDFfile.pdf type=application/pdf modtime93401549
    size60]

    2: 100% docid48 [url=/xapian-bindings-1.0.4/apidoc.pdf sample=xapian-core
    Reference Manual 1.0.4 Generated by Doxygen 1.5.2 Tue Oct 30 05:53:46 2007
    Contents 1 xapian-core Namespace Index 1.1 2 xapian-core Namespace List . .
    . . . . . . . . . . . . . . . . . . . . 1 1 3 3 5 5 7 7 9 9 11 11 23 23 28
    32 35 44 46 52 63 65 xapian-core Hierarchical Index 2.1 xapian-core Class
    Hierarchy . . . . . . . . . . . . . . . . . . . . . . 3 xapian-core Class
    Index 3.1 xapian-core Class List . . . . . . . . . . . . . . . . . . . . . .
    . . . . 4 xapian-core File Index 4.1 xapian-core ... type=application/pdf
    modtime94458530 size12197]
    On Nov 14, 2007 10:23 AM, James Aylett wrote:
    On Wed, Nov 14, 2007 at 10:17:54AM -0500, Aleph Thomas wrote:

    I am consulting the DB made by omega from PHP, then I need recovery all the
    files that are pdf and talk about omega for example, my query is:

    $query_string = "mime:pdf/ AND omega";
    ...
    $qp->add_prefix("mime", "T");
    ...

    Then I not receive any results, and have files application/pdf indexed,
    You won't. The term generated is (or should be) Tapplication/pdf - try
    adding it as a boolean term. add_boolean_prefix not add_prefix? Sorry,
    I know what I mean, but I'm too rushed right now to figure out if this
    is the right approach. But your problem is the construction of the term.

    J

    --

    /--------------------------------------------------------------------------\
    James Aylett xapian.org
    james@tartarus.org uncertaintydivision.org

    _______________________________________________
    Xapian-discuss mailing list
    Xapian-discuss@lists.xapian.org
    http://lists.xapian.org/mailman/listinfo/xapian-discuss
  • James Aylett at Nov 14, 2007 at 3:46 pm

    On Wed, Nov 14, 2007 at 10:33:50AM -0500, Aleph Thomas wrote:

    You are right, I using boolean and receive, that results, only if I search
    for example mime:pdf not receive any think, I not can make searchs in the
    terms?, for example if I have a title and need search in it?
    You can't search within terms - but if you have a title, you can
    create terms from the words within that title. Scriptindex and omindex
    both provide mechanisms for doing this. T (MIME type) is special,
    because there's little point searching on (say) the subtype, or part
    of the subtype.

    J

    --
    /--------------------------------------------------------------------------\
    James Aylett xapian.org
    james@tartarus.org uncertaintydivision.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupxapian-discuss @
categoriesxapian
postedNov 14, '07 at 3:17p
activeNov 14, '07 at 3:46p
posts4
users2
websitexapian.org
irc#xapian

2 users in discussion

James Aylett: 2 posts Aleph Thomas: 2 posts

People

Translate

site design / logo © 2021 Grokbase