Aqueduct.SitecoreLib.Indexing.SearchIndexer.CreateCustomIndexField C# (CSharp) Метод

CreateCustomIndexField() приватный статический Метод

private static CreateCustomIndexField ( string fieldName, string value, bool tokenise ) : Field
fieldName string
value string
tokenise bool
Результат Lucene.Net.Documents.Field
        private static Field CreateCustomIndexField(string fieldName, string value, bool tokenise)
        {
            // Store the original field value in the index.
            // http://incubator.apache.org/lucene.net/docs/2.1/Lucene.Net.Documents.Field.StoreFields.html
            Field.Store store = Field.Store.YES;

            Field.Index index;
            if (tokenise)
            {
                // Index the field's value using an Analyzer, so it can be searched.
                // http://incubator.apache.org/lucene.net/docs/2.1/Lucene.Net.Documents.Field.IndexMembers.html
                index = Field.Index.TOKENIZED;
            }
            else
            {
                // Index the field's value without using an Analyzer, so it can't be searched.
                // http://incubator.apache.org/lucene.net/docs/2.1/Lucene.Net.Documents.Field.IndexMembers.html
                index = Field.Index.UN_TOKENIZED;
            }

            return new Field(fieldName, value, store, index);
        }