lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aditi Goyal" <aditigupt...@gmail.com>
Subject Indexing the fields
Date Tue, 12 Feb 2008 11:40:24 GMT
Hi ,
I am using PyLucene in my program. I want to search for all the words with
the "sim" in it. So, I typed "sim*" in my query. It is also giving me
results which doesnt have word "sim" in it. But those have "si" in it.
Am I doing something wrong. Please advice.

Following is the code which I used for searching:
        directory = PyLucene.FSDirectory.getDirectory(index_dir, False)
        searcher = PyLucene.IndexSearcher(directory)
        analyzer = PyLucene.StandardAnalyzer()

        simple_query = ['Mailbody' , 'Subject', 'From', 'To', 'Cc', 'Bcc',
'pdf','doc','msword','html','plain']
        parser = PyLucene.MultiFieldQueryParser(simple_query, analyzer )
        parser.setDefaultOperator(PyLucene.QueryParser.Operator.AND)
        query = parser.parse(command)
        hits = searcher.search(query)


Also, is there any way by which I can set the search as partial search by
default.
Thanks in advance.

Regards,
Aditi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message