Ok, better example. For example I want to search pdf file. 1) Indexing:
Document doc = LucenePDFDocument.getDocument(f); doc.add(new Field("contents", new FileReader(f))); doc.add(new Field("filename", "Example.pdf", Field.Store.YES, Field.Index.TOKENIZED)); doc.add(new Field("Creator", "John Smith", Field.Store.YES, Field.Index.TOKENIZED)); doc.add(new Field("Title", "hohoho", Field.Store.YES, Field.Index.TOKENIZED)); 2) Searching in contents - it WORKS OK QueryParser parser = new QueryParser("contents", new StandardAnalyzer()); Query q = parser.parse(searchText); Hits hits = is.search(q); 3) Searching in title - it DON'T WORK (I try to find hohoho, and nothing). Same with searching in creator, etc... QueryParser parser = new QueryParser("title", new StandardAnalyzer()); Query q = parser.parse(searchText); Hits hits = is.search(q); I simple can't understand, where I made mistake? It's simple code... -- View this message in context: http://www.nabble.com/How-to-search-in-metadata--%28filename%2C-document-title%2C-cocument-creator%2C-...%29-tp20069124p20073802.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]