Amir Bakhtiar
2005-Sep-23 15:58 UTC
[Xapian-discuss] Unicode and complex queries from Python
I understand that the current QueryParser is not unicode aware so I am trying to build my own queries by stringing together various Queries with OP_*. It seems that for anything complex, such as a three word phrase, I need to call Query with begin and end iterators. I am not sure how to do this? (As a hack I think I can create a document with 3 words and get its TermIterator, but that seems circuitous.) It would be great if functions such as this would take a Python list or iterator or Term or Query objects. Any thoughts on when the unicode-aware QueryParser will be available? -A-
James Aylett
2005-Sep-23 16:06 UTC
[Xapian-discuss] Unicode and complex queries from Python
On Fri, Sep 23, 2005 at 10:58:06AM -0400, Amir Bakhtiar wrote:> I understand that the current QueryParser is not unicode aware so I am > trying to build my own queries by stringing together various Queries with > OP_*. It seems that for anything complex, such as a three word phrase, I > need to call Query with begin and end iterators. I am not sure how to do > this? (As a hack I think I can create a document with 3 words and get its > TermIterator, but that seems circuitous.) It would be great if functions > such as this would take a Python list or iterator or Term or Query objects.We're having difficulties with the system used to wrap Xapian for Python. In theory you should be able to pass a Python sequence and have everything work as expected. How are you passing in iterators via Python? They aren't wrapped as far as I know... J -- /--------------------------------------------------------------------------\ James Aylett xapian.org james@tartarus.org uncertaintydivision.org
Amir Bakhtiar
2005-Sep-24 18:18 UTC
[Xapian-discuss] Unicode and complex queries from Python
On Fri, 23 Sep 2005 16:06:24 +0100, James Aylett wrote:>How are you passing in iterators via Python? They aren't wrapped as >far as I know...I tried passing a list and an iterator. Both failed with the wrong number/type of args. I also tried creating a document and passing the termlist_begin and termlist_end and got a segmentation fault. Any ETA on the unicode aware QueryParser? -A-