Django

Code

Ticket #2707 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] Backend for Xapian working in branche search-api

Reported by: sdm@underlinux.com.br Assigned to: adrian
Milestone: Component: Contrib apps
Version: Keywords: search-api xapian
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Note that this does not implement the sortFields yet, I'm working in it.

Attachments

patch1.diff (2.4 kB) - added by sdm@underlinux.com.br on 09/12/06 17:31:59.
Patch for Xapian
xapian.py.patch (2.3 kB) - added by sdm@garimpar.com on 09/13/06 12:03:58.
New version of Xapian backend (need query.py.patch)
query.py.patch (0.7 kB) - added by sdm@garimpar.com on 09/13/06 12:05:15.
New version of Hit class
patch2.diff (6.1 kB) - added by sdm@underlinux.com.br on 09/14/06 14:14:31.
patch3.diff (6.4 kB) - added by sdm@garimpar.com on 09/14/06 17:46:36.
Final (?) version
patch4.diff (7.0 kB) - added by sdm@garimpar.com on 09/25/06 13:13:38.

Change History

09/12/06 17:31:59 changed by sdm@underlinux.com.br

  • attachment patch1.diff added.

Patch for Xapian

09/13/06 12:03:58 changed by sdm@garimpar.com

  • attachment xapian.py.patch added.

New version of Xapian backend (need query.py.patch)

09/13/06 12:05:15 changed by sdm@garimpar.com

  • attachment query.py.patch added.

New version of Hit class

09/13/06 12:13:08 changed by sdm@garimpar.com

Done:

  • Added 2 news patch for query.py and xapian.py
  • In the query.py you can now just execute the ".get_object" and it will return the respective object for the result
  • Changed the __repr__ of Hit class to be more readable

TODO:

  • Better documentation in the code
  • Put the order_by argument to work
  • [Future] Remote backend functionalities?

09/14/06 14:13:14 changed by anonymous

Now I'm posting a big patch for 4 files (xapian.py, base.py, lucene.py, query.py) Done:

  • Now the order_by works to Xapian
  • Was need edit the Lucene, I need that someone try it, I can't

Todo:

  • Put filters like "user:django" to work

09/14/06 14:14:31 changed by sdm@underlinux.com.br

  • attachment patch2.diff added.

09/14/06 17:46:36 changed by sdm@garimpar.com

  • attachment patch3.diff added.

Final (?) version

09/14/06 17:56:42 changed by sdm@garimpar.com

  • status changed from new to closed.
  • resolution set to fixed.

I've finished my work for now.

The Xapian backend are working with the following features:

  • order_by
  • Prefixes (like title:django)
  • Support for functions instead fields (needed when you need index "caminhao" instead "caminhão")
  • Return the object of a Hit when "get_object()" is called

WARNING

  • The version 0.3 of xapwrap (actualy the most recent - 2006-09-14) is BUGGED for newers versions of Xapian, it uses the "set_prefix" for QueryParser? object, but the real function is "add_prefix", so you need edit the file "xapwrap/index.py" in the root of source code, go to the line 528 and change it, after (re)install the xapwrap and everything will be cool ;D
  • This still untested for Lucene and Hype, so please, someone test it

Well...is it...I hope that every body enjoy ;)

09/25/06 13:13:06 changed by sdm@garimpar.com

Patch 4 added

Now I applied the getitem and getslice to allow easy access when used for web pages (page-based results)

Note: this patch is applied above the revision #3841

09/25/06 13:13:38 changed by sdm@garimpar.com

  • attachment patch4.diff added.

Add/Change #2707 ([patch] Backend for Xapian working in branche search-api)




Change Properties
Action