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,
[code]
File indexDirFile = new File(this.indexDir);
Directory dir = FSDirectory.open(indexDirFile);
/**
* 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
IndexWriter.
* Once IndexWriter has been created with this object, changes to
this
* object will not affect the IndexWriter instance. For that, use
* LiveIndexWriterConfig that is returned from
IndexWriter.getConfig().
*/
IndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_46,
analyzer);
if((overrideOpenModeFlag && openModeFlag)|| create){
iwc.setOpenMode(IndexWriterConfig.OpenMode.CREATE);
}else{
iwc.setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_APPEND);
}
this.writer = new IndexWriter(dir, iwc);
[code]
and my indexSearcher is ,
[code]
IndexReader indexReader = null;
IndexSearcher indexSearcher = null;
try{
File indexDirFile = new File(this.indexDir);
Directory dir = FSDirectory.open(indexDirFile);
indexReader = DirectoryReader.open(dir);
indexSearcher = new IndexSearcher(indexReader);
}catch(IOException ioe){
ioe.printStackTrace();
}
this.indexSearcher = indexSearcher;
[code]
please advice,
--
View this message in context:
http://lucene.472066.n3.nabble.com/New-to-Apache-Lucene-Need-help-in-querying-data-text-with-wildCards-tp4116515p4116519.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]