lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gian Maria Ricci <>
Subject searching on NOT_ANALYZED fields seems not working.
Date Thu, 19 Jul 2012 15:10:32 GMT
Hi to everyone,


I'm indexing a document with StandardAnalyzer and the document has this


document.Add(new Field("Id", id, Field.Store.YES, Field.Index.NOT_ANALYZED,

document.Add(new Field("content", test, Field.Store.COMPRESS,

document.Add(new Field("channelname", "Forum", Field.Store.YES,



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


Am I missing something? Thanks in advance.


Gian Maria



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message