#2707 closed defect (fixed)
[patch] Backend for Xapian working in branche search-api
Description ¶
Note that this does not implement the sortFields yet, I'm working in it.
Change History (10)
by , 18 years ago
Attachment: | patch1.diff added |
---|
by , 18 years ago
Attachment: | xapian.py.patch added |
---|
New version of Xapian backend (need query.py.patch)
comment:1 by , 18 years ago
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?
comment:2 by , 18 years ago
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
by , 18 years ago
Attachment: | patch2.diff added |
---|
comment:3 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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 ;)
comment:4 by , 18 years ago
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
by , 18 years ago
Attachment: | patch4.diff added |
---|
Patch for Xapian