Mercurial Hosting > luan
comparison src/luan/modules/lucene/Lucene.luan @ 1375:5c3702f60200
cleanup
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 11 Jul 2019 23:19:11 -0600 |
parents | 709f7498a363 |
children | 4c9691d6288f |
comparison
equal
deleted
inserted
replaced
1374:72b699bad1a4 | 1375:5c3702f60200 |
---|---|
22 local logger = Logging.logger "Lucene" | 22 local logger = Logging.logger "Lucene" |
23 | 23 |
24 | 24 |
25 local Lucene = {} | 25 local Lucene = {} |
26 | 26 |
27 Lucene.instances = {} | |
28 | |
29 Lucene.type = { | 27 Lucene.type = { |
30 english = LuceneIndex.ENGLISH_FIELD_PARSER | 28 english = LuceneIndex.ENGLISH_FIELD_PARSER |
31 string = LuceneIndex.STRING_FIELD_PARSER | 29 string = LuceneIndex.STRING_FIELD_PARSER |
32 integer = NumberFieldParser.INT | 30 integer = NumberFieldParser.INT |
33 long = NumberFieldParser.LONG | 31 long = NumberFieldParser.LONG |
61 index.search_in_transaction = java_index.search_in_transaction | 59 index.search_in_transaction = java_index.search_in_transaction |
62 index.delete_all = java_index.delete_all | 60 index.delete_all = java_index.delete_all |
63 index.delete = java_index.delete | 61 index.delete = java_index.delete |
64 index.save = java_index.save | 62 index.save = java_index.save |
65 index.update_in_transaction = java_index.update_in_transaction | 63 index.update_in_transaction = java_index.update_in_transaction |
66 -- index.close = java_index.close | |
67 index.ensure_open = java_index.ensure_open | 64 index.ensure_open = java_index.ensure_open |
68 index.next_id = java_index.nextId | 65 index.next_id = java_index.nextId |
69 index.highlighter = java_index.highlighter | 66 index.highlighter = java_index.highlighter |
70 index.indexed_only_fields = java_index.indexed_only_fields | 67 index.indexed_only_fields = java_index.indexed_only_fields |
71 index.count_tokens = java_index.count_tokens | 68 index.count_tokens = java_index.count_tokens |
72 | 69 index.close = closer.close |
73 Lucene.instances[index] = true | |
74 | |
75 function index.close() | |
76 Lucene.instances[index] = nil | |
77 closer.close() | |
78 end | |
79 | 70 |
80 function index.search( query, from, to, options ) | 71 function index.search( query, from, to, options ) |
81 from or error "missing 'from' parameter" | 72 from or error "missing 'from' parameter" |
82 to or error "missing 'to' parameter" | 73 to or error "missing 'to' parameter" |
83 options = options or {} | 74 options = options or {} |