lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gudiseashok <>
Subject Re: New to Apache Lucene: Need help in querying data - text with wildCards
Date Mon, 10 Feb 2014 17:27:19 GMT
Hi Michael

Thank you very much for your response, before I am trying your solution
(writing my own analyzer) I am just using Standard Analyzer which is
available in the example in lucene documentation, please see here my code
which is writing to lucene,

   File indexDirFile = new File(this.indexDir);

        Directory dir =;
         * Use by certain classes to match version compatibility across
releases of Lucene.
         * WARNING: When changing the version parameter that you supply to
components in Lucene,
         * do not simply change the version at search-time, but instead also
adjust your
         * indexing code to match, and re-index.

        Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_46);

         * Holds all the configuration that is used to create an
         * Once IndexWriter has been created with this object, changes to
         * object will not affect the IndexWriter instance. For that, use
         * LiveIndexWriterConfig that is returned from
        IndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_46,
        if((overrideOpenModeFlag && openModeFlag)|| create){
        this.writer = new IndexWriter(dir, iwc);

and my indexSearcher is ,


       IndexReader indexReader = null;
       IndexSearcher indexSearcher = null;
            File indexDirFile = new File(this.indexDir);
            Directory dir =;
            indexReader  =;
            indexSearcher = new IndexSearcher(indexReader);
       }catch(IOException ioe){

       this.indexSearcher = indexSearcher;

please advice,

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message