Indexing the fields

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Indexing the fields

Aditi Goyal
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',
        parser = PyLucene.MultiFieldQueryParser(simple_query, analyzer )
        query = parser.parse(command)
        hits =

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