lucenenet-dev mailing list archives

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

it is almost 12 hours in front of my PC :( and I'm starting to think that I
need to take a break ;),

I realized it was a casing problem few minutes after wrote this email, and I
realized that for today it is time to stop writing code :D :D

Thanks a lot for the quick response :)

Gian Maria.

-----Original Message-----
From: Granroth, Neal V. [] 
Sent: giovedì 19 luglio 2012 17:15
Subject: RE: searching on NOT_ANALYZED fields seems not working.

The case of the first character of the stored term "Forum" and the search
term "forum" differ.

- Neal G.

-----Original Message-----
[] On Behalf Of Gian Maria Ricci
Sent: Thursday, July 19, 2012 10:11 AM
Subject: searching on NOT_ANALYZED fields seems not working.

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



View raw message