Hello all, I have a problem, I create a DB using the java binding and
will use from PHP and not work, not give me results for a simple
search that work in java, now If I make the same but with a database
created in python then give me an error that say that not know the
database type. And the PHP search work ok, for the omega database, and
a database created using PHP. I have PHP5, and Xapian 1.04, and the
binding too.

Please any suggestion about

Thanks

al.

Search Discussions

  • James Aylett at Nov 23, 2007 at 11:21 am

    On Wed, Nov 21, 2007 at 08:28:33AM -0500, Aleph Thomas wrote:

    Hello all, I have a problem, I create a DB using the java binding and
    will use from PHP and not work, not give me results for a simple
    search that work in java, now If I make the same but with a database
    created in python then give me an error that say that not know the
    database type. And the PHP search work ok, for the omega database, and
    a database created using PHP. I have PHP5, and Xapian 1.04, and the
    binding too.
    I just want to get this completely clear in my head. You've created a
    database using the Java bindings 1.04 and Xapian 1.04, you can search
    correctly using the Java bindings but not the PHP5 bindings 1.04. If
    you create the database using the Python bindings 1.04, then
    <something> (it's not clear what - using PHP bindings?) says it's the
    wrong database type.

    If you create a database using the PHP bindings, you can search it
    using PHP. Similarly, PHP can search an omindex-created database
    (using omega 1.04).

    I may be confused, but it sounds to me like you may have some
    different versions knocking around (and possibly some other problems
    as well). I'd also like to know what the actual error was in the very
    first thing you report (PHP bindings not searching a Java
    binding-created database). You just say it doesn't work - does it give
    an error? Does it give no results?

    Other information may be helpful at some point, such as what the
    database type is (flint or quartz), are you using stemming, and so
    on.

    J

    --
    /--------------------------------------------------------------------------\
    James Aylett xapian.org
    james@tartarus.org uncertaintydivision.org
  • Aleph Thomas at Nov 23, 2007 at 2:33 pm
    That I need is that use Java create the database and search from php,
    I search in the database created in java but not give me any result...

    // here is the java code, maybe is that the dabase created is quartz,
    can be changed to flint?

    // create or *overwrite an existing* Xapian (quartz) database
    String dbpath = args[0];
    WritableDatabase db = new WritableDatabase(dbpath,
    Xapian.DB_CREATE_OR_OPEN);

    // walk through remaining command-line arguments and
    // add each argument as a single to term to a new document.
    for (int x = 1; x < args.length; x++) {

    String term = args[x];
    Document doc = new Document();

    doc.addTerm(term);
    doc.addPosting(term, doc.getTermListCount());
    doc.addPosting(term, doc.getTermListCount());
    doc.addPosting(term, doc.getTermListCount());

    Stem stem = new Stem("english");

    doc.addPosting(stem.stemWord("is"), 0);
    doc.addPosting(stem.stemWord("is"), 0);
    doc.addPosting(stem.stemWord("there"), 2);
    doc.addPosting(stem.stemWord("anybody"), 3);
    doc.addPosting(stem.stemWord("out"), 4);
    doc.addPosting(stem.stemWord("there"), 5);

    doc.setData("codeID=4");

    db.addDocument(doc);
  • James Aylett at Nov 23, 2007 at 3:51 pm

    On Fri, Nov 23, 2007 at 09:33:23AM -0500, Aleph Thomas wrote:

    That I need is that use Java create the database and search from php,
    I search in the database created in java but not give me any result...
    Do you have an iamflint file in your database directory? Is this all
    built from the same two archives (xapian-core and xapian-bindings for
    1.0.4)?

    J

    --
    /--------------------------------------------------------------------------\
    James Aylett xapian.org
    james@tartarus.org uncertaintydivision.org
  • Aleph Thomas at Nov 23, 2007 at 4:51 pm
    To the first, yes, I have the iamflint in the database, the second I
    down the php5 building from xapian mirror site, I have ubuntu, and the
    java binding I built of the xapian-bindings for 1.0.4.


    On 11/23/07, James Aylett wrote:
    On Fri, Nov 23, 2007 at 09:33:23AM -0500, Aleph Thomas wrote:

    That I need is that use Java create the database and search from php,
    I search in the database created in java but not give me any result...
    Do you have an iamflint file in your database directory? Is this all
    built from the same two archives (xapian-core and xapian-bindings for
    1.0.4)?

    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 23, 2007 at 4:58 pm

    On Fri, Nov 23, 2007 at 11:51:59AM -0500, Aleph Thomas wrote:

    To the first, yes, I have the iamflint in the database, the second I
    down the php5 building from xapian mirror site, I have ubuntu, and the
    java binding I built of the xapian-bindings for 1.0.4.
    Okay... what 'xapian mirror site'?

    J

    --
    /--------------------------------------------------------------------------\
    James Aylett xapian.org
    james@tartarus.org uncertaintydivision.org
  • Aleph Thomas at Nov 23, 2007 at 5:12 pm
    http://www.xapian.org/debian feisty

    On 11/23/07, James Aylett wrote:
    On Fri, Nov 23, 2007 at 11:51:59AM -0500, Aleph Thomas wrote:

    To the first, yes, I have the iamflint in the database, the second I
    down the php5 building from xapian mirror site, I have ubuntu, and the
    java binding I built of the xapian-bindings for 1.0.4.
    Okay... what 'xapian mirror site'?

    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupxapian-discuss @
categoriesxapian
postedNov 21, '07 at 1:28p
activeNov 23, '07 at 5:12p
posts7
users2
websitexapian.org
irc#xapian

2 users in discussion

Aleph Thomas: 4 posts James Aylett: 3 posts

People

Translate

site design / logo © 2021 Grokbase