public LuceneLoadOperation(LuceneConnection luceneConnection, Entity entity, bool deleteFirst = false) {
     _luceneConnection = luceneConnection;
     _entity = entity;
     _primaryKey = entity.PrimaryKey.ToArray();
     _deleteFirst = deleteFirst;
     _map = LuceneWriter.CreateFieldMap(entity);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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();
 }
Exemplo n.º 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();
 }
        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());
            }
        }
Exemplo n.º 6
0
 public LuceneExtract(LuceneConnection luceneConnection, Entity entity)
 {
     _luceneConnection = luceneConnection;
     _entity           = entity;
     _fields           = _entity.Fields.WithInput();
 }
Exemplo n.º 7
0
 public LuceneExtract(LuceneConnection luceneConnection, Entity entity) {
     _luceneConnection = luceneConnection;
     _entity = entity;
     _fields = _entity.Fields.WithInput();
 }
 public LuceneEntityDelete(LuceneConnection luceneConnection, Entity entity){
     _luceneConnection = luceneConnection;
     _entity = entity;
     _primaryKey = entity.PrimaryKey.ToArray();
 }
Exemplo n.º 9
0
 public LuceneEntityDelete(LuceneConnection luceneConnection, Entity entity)
 {
     _luceneConnection = luceneConnection;
     _entity           = entity;
     _primaryKey       = entity.PrimaryKey.ToArray();
 }