Joss Shaw | 1 Mar 12:39 2007
Picon

Opening/closing indexes - upgrading to write index ?

Hi all,

Just wondering if it's possible to upgrade a read-only index/DB handle to a writeable one ?  Or if I need to
close the index and open it again ?  Also if the reverse is true. Can I downgrade a writeable index to a
read-only one ?  Or is it a matter of just reopening the index again ?

I'm doing all this in Perl and trying to call the close() method on the index, but nothing happens. I think the
writeable index always seems to leave a lock file around because maybe the object isn't properly destructing....

>joss

	
	
		
___________________________________________________________ 
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail
Championships. Plus: play games and win prizes. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 
Olly Betts | 1 Mar 16:11 2007

Re: Opening/closing indexes - upgrading to write index ?

On Thu, Mar 01, 2007 at 11:39:10AM +0000, Joss Shaw wrote:
> Just wondering if it's possible to upgrade a read-only index/DB handle
> to a writeable one ?  Or if I need to close the index and open it
> again ?

No, and yes.

> Also if the reverse is true. Can I downgrade a writeable
> index to a read-only one ?  Or is it a matter of just reopening the
> index again ?

WritableDatabase is a subclass of Database, so you can pass a
WritableDatabase object whereever a Database object is expected.
But you can't actually change its class, so it remains a
WritableDatabase inside.

Provided all pending changes have been flushed, there's little
overhead in using a WritableDatabase in this way (if there are
pending changes, some operations require us to merge the pending
changes with the underlying data on the fly).

> I'm doing all this in Perl and trying to call the close() method on
> the index, but nothing happens.

There is no close() method (though there is a plan to add one).
Just assign "undef" and the referencing counting should take care of
closing it:

    $writabledatabase = undef;

(Continue reading)

Olly Betts | 3 Mar 05:30 2007

PHP documentation and examples updated

Sorry it's taken me a while to sort out, but here's the latest
documentation in SVN:

http://svn.xapian.org/trunk/xapian-bindings/php/docs/bindings.html?view=co

The examples are now split into ".php4" and ".php5" versions.

And I've implemented a version of "simpleexpand" in PHP too.  This
demonstrates the use of relevance feedback.

Cheers,
    Olly
James Aylett | 3 Mar 05:45 2007

Re: PHP documentation and examples updated

On Sat, Mar 03, 2007 at 04:30:37AM +0000, Olly Betts wrote:

> Sorry it's taken me a while to sort out, but here's the latest
> documentation in SVN:
> 
> http://svn.xapian.org/trunk/xapian-bindings/php/docs/bindings.html?view=co

Did we not have docs covering the pythonic iterators? Or did I never
commit them?

J

--

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james <at> tartarus.org                               uncertaintydivision.org
Olly Betts | 3 Mar 05:55 2007

Re: PHP documentation and examples updated

On Sat, Mar 03, 2007 at 04:45:15AM +0000, James Aylett wrote:
> On Sat, Mar 03, 2007 at 04:30:37AM +0000, Olly Betts wrote:
> 
> > Sorry it's taken me a while to sort out, but here's the latest
> > documentation in SVN:
> > 
> > http://svn.xapian.org/trunk/xapian-bindings/php/docs/bindings.html?view=co
> 
> Did we not have docs covering the pythonic iterators? Or did I never
> commit them?

They are documented, but not in the *PHP* bindings documentation.

See here instead:

http://svn.xapian.org/trunk/xapian-bindings/python/docs/bindings.html?view=co

Cheers,
    Olly
James Aylett | 3 Mar 05:57 2007

Re: PHP documentation and examples updated

On Sat, Mar 03, 2007 at 04:55:04AM +0000, Olly Betts wrote:

> > Did we not have docs covering the pythonic iterators? Or did I never
> > commit them?
> 
> They are documented, but not in the *PHP* bindings documentation.

D'oh. You can tell I'm not used to being up at this time :)

J

--

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james <at> tartarus.org                               uncertaintydivision.org
Kevin Duraj | 5 Mar 06:28 2007
Picon

Key too long: length was 258 bytes, maximum length of a key is BTREE_MAX_KEY_LEN bytes

Xapians!

I am getting the following error when indexing data with scriptindex ...

E: Key too long: length was 258 bytes, maximum length of a key is
BTREE_MAX_KEY_LEN bytes
Exception: Key too long: length was 258 bytes, maximum length of a key is
BTREE_MAX_KEY_LEN bytes

What is the maximum of the characters we can have in:
      |____ Field : boolean=Q unique=Q weight=5 lower index field

Thank you,
- Kevin Duraj
Gupteshwar Joshi | 5 Mar 11:25 2007
Picon

Problem with query parse patch

Hello All,
I applied the patch available for query parsing by which wildcard can be
made
enable .But I appied that patch then run "make" in xapian-binding folder.

When I run simpleindex.php I got error as
Fatal error: Call to undefined function new_WritableDatabase() in
/home/gupteshwar/public_html/xapian_php/examples/simpleindex.php on line 54

Please help me in this regard.

Thank you

--

-- 
              (((())))
              ( <at>   <at> )
                 (_)
+----oOO------------Ooo----------+
|      Gupteshwar D Joshi            |
|                                              |
+------------------------------------+
              |___|___|
                 | | | |
              ooO Ooo
Matti Heinonen | 5 Mar 12:29 2007
Picon
Picon

Getting document's context

Hello all,

Is there a way to access an indexed document's contents sequentally 
starting from a given position in the document? I've been banging my 
thick head on xapian's documentation and wading my feet in the depths of 
the Internet for a day or so and not getting anywhere.

I'm using Python bindings for Xapian. Indexing and searching work fine, 
but I cannot figure out how to show a bit of textual context around 
terms found in a certain document (just like Google does).

When indexing, I am including posting information. When searching, I am 
able to get the position information for a term using 
database.positionlist(). But how to get the text in the positions around 
  the term?

Matti
--

-- 
Matti Heinonen                           | email: matti.heinonen <at> uta.fi
Atk-erikoistutkija                       | tel: +358 3 215 8523
Yhteiskuntatieteellinen tietoarkisto FSD | fax: +358 3 215 8519
FIN-33014 TAMPEREEN YLIOPISTO            | WWW: http://www.fsd.uta.fi/
Picon

Re: Getting document's context

i want to use the same thing, but in think me must get the hole data and
do it without help from xapian. right?

Matti Heinonen schrieb:
> Hello all,
>
> Is there a way to access an indexed document's contents sequentally 
> starting from a given position in the document? I've been banging my 
> thick head on xapian's documentation and wading my feet in the depths 
> of the Internet for a day or so and not getting anywhere.
>
> I'm using Python bindings for Xapian. Indexing and searching work 
> fine, but I cannot figure out how to show a bit of textual context 
> around terms found in a certain document (just like Google does).
>
> When indexing, I am including posting information. When searching, I 
> am able to get the position information for a term using 
> database.positionlist(). But how to get the text in the positions 
> around  the term?
>
>
>
> Matti

--

-- 
Mit freundlichen Grüßen

Felix Antonius Wilhelm Ostmann
--------------------------------------------------
Websuche   Search   Technology   GmbH   &   Co. KG
(Continue reading)


Gmane