Hi All,

I have created indexes on a log file (has values like ip-address and some text) which is comma separated. i indexed it with standardAnalyzer, following is the code of it :
Java Code:
indexWriter = new IndexWriter(FSDirectory.open(new File(LUCENE_INDEX_DIRECTORY)), standardAnalyzer, create, IndexWriter.MaxFieldLength.LIMITED);
	document = new Document();
    	document.add(new Field("path", path, Field.Store.YES, Field.Index.NO));
       	document.add(new Field("content", file, Field.Store.NO, Field.Index.ANALYZED));
whereas, problem occour when i search numeric values or ip-addresses. it doesn't return result. whereas, with text it is working fine. following is the code snippet :
Java Code:
Qpublic class SearchEngine {
    private IndexSearcher searcher = null;
    private QueryParser parser = null;

	private IndexReader reader = null;
    private String LUCENE_INDEX_DIRECTORY = "D:\\lucene";
    /** Creates a new instance of SearchEngine */
	public SearchEngine() throws IOException {
    	File file = new File(LUCENE_INDEX_DIRECTORY);
    	reader = IndexReader.open(FSDirectory.open(file));
    	searcher = new IndexSearcher(reader);
        parser = new QueryParser(Version.LUCENE_35, "content", new StandardAnalyzer(Version.LUCENE_35));
    public ScoreDoc[] performSearch(String queryString)
    throws IOException, ParseException {
    	TopScoreDocCollector collector = TopScoreDocCollector.create(10, false);
//        Query query = parser.parse(queryString);
    	Query query = new WildcardQuery(new Term("content",queryString+"*"));
//    	Query query = new FuzzyQuery(new Term("content", queryString));
        searcher.search(query, collector);
        ScoreDoc[] hits = collector.topDocs().scoreDocs;
        System.out.println("Total hits : " +collector.getTotalHits());
        return hits;
    public IndexSearcher getSearcher() {
		return searcher;

According to my findings - it is analyzer which need to be extended, please help me in solving it and if it is analyser then how to costummize it.

Rahul Mathur