[Xapian-discuss] Omega and indexing documents
Christiano Anderson
anderson at pegasus.eti.br
Wed Aug 10 19:12:12 BST 2005
Hello,
I am trying to build a script in Python to add documents to a database.
After that I am trying to use Omega to search into this database, but
Omega cannot retrieve any information from it. I have read omindex.cc
but I thing I am doing something wrong or something is missing.
This is the script I am using to index:
------- index.py -------
import xapian
db = xapian.WritableDatabase("teste01", xapian.DB_CREATE_OR_OPEN)
doc = xapian.Document()
record = """caption=Test page
sample=This is a test
size=4554
url=http://www.test.com
"""
doc.set_data(record)
doc.add_term("Ttext/html")
doc.add_term("Hhttp://www.test.com")
doc.add_posting(record, 1)
db.add_document(doc)
------ EOF -------
When I open the database with get_data() function, I can retrieve the
following information:
---
caption=Test page
sample=This is a test
size=4554
url=http://www.test.com
---
But Omega doesn't return anything when I submit a 'test' search. Can
someone point me where is the mistake? Am I using the add_term function
on the right way?
Thanks
Christiano
More information about the Xapian-discuss
mailing list