コード例 #1
0
 public LuceneLoadOperation(LuceneConnection luceneConnection, Entity entity, bool deleteFirst = false) {
     _luceneConnection = luceneConnection;
     _entity = entity;
     _primaryKey = entity.PrimaryKey.ToArray();
     _deleteFirst = deleteFirst;
     _map = LuceneWriter.CreateFieldMap(entity);
 }
コード例 #2
0
 public LuceneLoadOperation(LuceneConnection luceneConnection, Entity entity, bool deleteFirst = false)
 {
     _luceneConnection = luceneConnection;
     _entity           = entity;
     _primaryKey       = entity.PrimaryKey.ToArray();
     _deleteFirst      = deleteFirst;
     _map = LuceneWriter.CreateFieldMap(entity);
 }
コード例 #3
0
 public LuceneKeysExtractAll(LuceneConnection luceneConnection, Entity entity, bool input = false) {
     _luceneConnection = luceneConnection;
     _entity = entity;
     _input = input;
     _fields = entity.PrimaryKey;
     if (entity.Version != null && !_fields.HaveField(entity.Version.Alias)) {
         _fields.Add(entity.Version);
     }
     _selected = _fields.Select(f => input ? f.Name : f.Alias).ToArray();
 }
コード例 #4
0
 public LuceneKeysExtractAll(LuceneConnection luceneConnection, Entity entity, bool input = false)
 {
     _luceneConnection = luceneConnection;
     _entity           = entity;
     _input            = input;
     _fields           = entity.PrimaryKey;
     if (entity.Version != null && !_fields.HaveField(entity.Version.Alias))
     {
         _fields.Add(entity.Version);
     }
     _selected = _fields.Select(f => input ? f.Name : f.Alias).ToArray();
 }
コード例 #5
0
        public static Analyzer Create(string analyzer, string version)
        {
            switch (analyzer.ToLower())
            {
            case "standard":
                return(new StandardAnalyzer(LuceneConnection.GetLuceneVersion(version)));

            case "simple":
                return(new SimpleAnalyzer());

            case "whitespace":
                return(new WhitespaceAnalyzer());

            default:
                return(new KeywordAnalyzer());
            }
        }
コード例 #6
0
 public LuceneExtract(LuceneConnection luceneConnection, Entity entity)
 {
     _luceneConnection = luceneConnection;
     _entity           = entity;
     _fields           = _entity.Fields.WithInput();
 }
コード例 #7
0
 public LuceneExtract(LuceneConnection luceneConnection, Entity entity) {
     _luceneConnection = luceneConnection;
     _entity = entity;
     _fields = _entity.Fields.WithInput();
 }
コード例 #8
0
 public LuceneEntityDelete(LuceneConnection luceneConnection, Entity entity){
     _luceneConnection = luceneConnection;
     _entity = entity;
     _primaryKey = entity.PrimaryKey.ToArray();
 }
コード例 #9
0
 public LuceneEntityDelete(LuceneConnection luceneConnection, Entity entity)
 {
     _luceneConnection = luceneConnection;
     _entity           = entity;
     _primaryKey       = entity.PrimaryKey.ToArray();
 }