The case of the first character of the stored term "Forum" and the search term "forum" differ.
- Neal G. -----Original Message----- From: hotmail_288fbf38c031d...@live.com [mailto:hotmail_288fbf38c031d...@live.com] On Behalf Of Gian Maria Ricci Sent: Thursday, July 19, 2012 10:11 AM To: lucene-net-dev@lucene.apache.org Subject: searching on NOT_ANALYZED fields seems not working. Hi to everyone, I'm indexing a document with StandardAnalyzer and the document has this format document.Add(new Field("Id", id, Field.Store.YES, Field.Index.NOT_ANALYZED, Field.TermVector.NO)); document.Add(new Field("content", test, Field.Store.COMPRESS, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS)); document.Add(new Field("channelname", "Forum", Field.Store.YES, Field.Index.NOT_ANALYZED)); Now I'm expecting to being able to search with this code Term t = new Term("channelname", "forum"); var query = new TermQuery(t); var docs = indexSearcher.Search(query, 10); but it always returns 0 documents. Documents are returned only if I use the Field.Index.ANALYZED enum, but I should be able to search even in NOT_ANALYZED especially because I do not want analyzer to mess up with content of this field, and I want it to be stored and searched without tokenizing. Am I missing something? Thanks in advance. Gian Maria