Ram Peters | 1 Apr 04:41
Picon

Xapian Search Result Sorting

I have local site developed using python for my country where people
post classifieds for 7 days for free and pay fees for longer period.
I thinking of using Xapian to provide searching capabilities.  What I
need to do is:

1. Sort the retrieve data accorinding to newest to oldest based on created_date.
2. Remove expired ads from Xapian Index periodically every day.  Also
if someone post an ad, it should reflect immediately in the search
results.

I am not sure where to start in Xapian to have these implemented.  Any
help, examples would be appreciated.

Thank you.
Peter
James Aylett | 1 Apr 13:58

Re: Finding a documents ID

On Sat, Mar 31, 2007 at 01:45:20AM +0100, Olly Betts wrote:

> * You can create a Document object from scratch and it then has no
>   document id associated (though it could just return 0 if it didn't
>   come from a Database).

That might actually be useful, because you could keep Document objects
around and find out whether they existed in a database or not. (I
can't think of a good reason for doing this, but I can imagine some
horrendous EIS for document management that might need it.)

> * The document id doesn't mean much without also knowing the Database   
>   but if you're searching over several Database objects together then
>   the (Database, document id) pair that the Document knows is for the
>   sub-Database not the combined Database, which users might find
>   suprising...

It would just need documenting clearly that this is for clever tricks.

> Or it might be possible to have a "Document::replace()" method.

That would be cool. Hmm... can we make a combined database out of
WritableDatabase objects? If so, you could find objects across several
databases, then modify them, since the Document would be able to apply
the write operation back to the underlying concrete db.

(This actually has a use, at least for me; one of the things I'd like
to do would require me to track the underlying contributing db of
every doc, which I don't like the idea of. OTOH with single-writer
locking I wouldn't want to hold all those dbs open, so I'd need it
(Continue reading)

Ram Peters | 1 Apr 21:29
Picon

Add Different Weights to Title, Description Fields

In Xapian how do you "Add Different Weights to Title, Description and
Category Fields"?

Thank you.
Olly Betts | 1 Apr 22:14
Favicon
Gravatar

Re: Add Different Weights to Title, Description Fields

On Sun, Apr 01, 2007 at 03:29:01PM -0400, Ram Peters wrote:
> In Xapian how do you "Add Different Weights to Title, Description and
> Category Fields"?

You can do this by setting the "wdfinc" parameter when calling
Document::add_posting() or Document::add_term().  Just pass different
values when generating terms for the different fields.  The default
wdfinc is 1.

Cheers,
    Olly
Marcus Rueckert | 2 Apr 00:21
Picon

Re: Re: Xapian 0.9.10 released

hi,

finally i had time to update the suse rpms to 0.9.10.
furthermore i added perl-Search-Xapian as package in the same
repository.

    darix

--

-- 
           openSUSE - SUSE Linux is my linux
               openSUSE is good for you
                   www.opensuse.org
Steve Nesbitt | 2 Apr 17:43
Picon
Favicon

Exception: Permission denied using template query

Hello, I am a new user of Xapian and Omega.  I have install the software index my files and set up apache to view
the output of omindex piped to index.html.  When I try and run the omega.cgi I get the Exception error on the
templates file.  I tried query and godmode same permissions denied.  I chgrp on the /var/lib/omega
directory recursively to apache (group of apache process) I have set chmod to 666 for same -- no luck.  Can
anyone help me with this error.

  Thanks

 
---------------------------------
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
Olly Betts | 2 Apr 21:01
Favicon
Gravatar

Re: Exception: Permission denied using template query

On Mon, Apr 02, 2007 at 08:43:26AM -0700, Steve Nesbitt wrote:
> Hello, I am a new user of Xapian and Omega.

What version?  What OS?  Is this built from source or from a package?

> I have install the
> software index my files and set up apache to view the output of
> omindex piped to index.html.  When I try and run the omega.cgi I get
> the Exception error on the templates file.

What's the *exact* error message?  I can't find the string "using
template" in the Omega sources...

> I tried query and godmode same permissions denied.  I chgrp on the
> /var/lib/omega directory recursively to apache (group of apache
> process) I have set chmod to 666 for same -- no luck.  Can anyone help
> me with this error.

What are the permissions of the parent directories - try:

ls -ld /var /var/lib /var/lib/omega

And can you run omega from the command line - e.g.:

./omega 'DB=default' 'P=test'

Cheers,
    Olly
Steve Nesbitt | 2 Apr 22:36
Picon
Favicon

Re: Exception: Permission denied using template query

Thanks for replying

Olly Betts <olly <at> survex.com> wrote:     On Mon, Apr 02, 2007 at 08:43:26AM -0700, Steve Nesbitt wrote:
> Hello, I am a new user of Xapian and Omega.

What version? What OS? Is this built from source or from a package?
  Omega 0.9.10, Fedora Core 6 64 bit.  Used RPM .

> I have install the
> software index my files and set up apache to view the output of
> omindex piped to index.html. When I try and run the omega.cgi I get
> the Exception error on the templates file.

What's the *exact* error message? I can't find the string "using
template" in the Omega sources...

  Exception: Couldn't read format template 'query' (Permission denied)

> I tried query and godmode same permissions denied. I chgrp on the
> /var/lib/omega directory recursively to apache (group of apache
> process) I have set chmod to 666 for same -- no luck. Can anyone help
> me with this error.

What are the permissions of the parent directories - try:

  permissions: drwxrwxrwx  - I also changed the directory group to user apache (still doesn't work)

ls -ld /var /var/lib /var/lib/omega

And can you run omega from the command line - e.g.:
(Continue reading)

Lucian Nicolescu | 2 Apr 23:35

phraze recognition, intersection

Hi all,

I have been playing around with this cool piece of software for about 3-4
months, got into some problems but after studying the docs and existing
information online I got through with building a nice, working index.

Now I hit a bottleneck and I turn to you guys for support.

I have the folowing info: a xapian text document postings and terms and a
list of search phrazes.
I need to identify any of the phrazes from my list that are present in my
document and link them to a certain location ... Read some of the topics on
this mailing list as well as the documentation but cannot determine a proper
way of doing this or if it's "doable".

I am thinking phrazes can also be stored in a separate index ... Is there a
way of "intersecting" them ...?

Thanks,
Lucian Nicolescu 
Richard Boulton | 3 Apr 10:32

Re: Exception: Permission denied using template query

Steve Nesbitt wrote:
>> What are the permissions of the parent directories - try:
>    
>   permissions: drwxrwxrwx  - I also changed the directory group to user apache (still doesn't work)
> 
>> ls -ld /var /var/lib /var/lib/omega

What is the actual output of the command Olly asked you to run?  Have 
you really changed /var to permissions drwxrwxrwx (not that you should, 
but accurate information from you is all we have to go on)?

If one of the directories above /var/lib/omega doesn't have permission 
set to allow apache to read the directory, you'll get a permission 
denied error.  So we need to know the permissions and ownership of all 
the directories above it, not just /var/lib/omega, to diagnose the problem.

Also, if any of the parent directores of /var/lib/omega are symbolic 
links, or /var/lib/omega is itself, you might have different problems 
(ie, the permission of the symlink isn't what matters - the permission 
of the directory linked to is what matters).

The output of Olly's command would have diagnosed both the problems, or 
clearly shown that neither potential problem is the cause, without 
needing further communication.  As a general plea to everyone, if asked 
to run a specific command to get information, please cut and paste the 
literal output of that command into your reply if at all possible.

--

-- 
Richard
(Continue reading)


Gmane