Autocomplete.Core.SearchAutoComplete.MakeDocument C# (CSharp) Method

MakeDocument() private static method

private static MakeDocument ( Hotel hotel, int searchCount ) : Lucene.Net.Documents.Document
hotel Hotel
searchCount int
return Lucene.Net.Documents.Document
        private static Document MakeDocument(Hotel hotel, int searchCount)
        {
            var doc = new Document();
            doc.Add(new Field(kSourceWordField, hotel.Name, Field.Store.YES,
                    Field.Index.NOT_ANALYZED)); // orig term
            doc.Add(new Field("hotelId", hotel.Id.ToString(), Field.Store.YES,
                    Field.Index.NOT_ANALYZED)); // orig term
            doc.Add(new Field(kGrammedWordsField, hotel.Name, Field.Store.YES,
                    Field.Index.ANALYZED)); // grammed
            doc.Add(new Field(kCountField,
                    searchCount.ToString(), Field.Store.NO,
                    Field.Index.NOT_ANALYZED)); // count
            return doc;
        }