Mercurial Hosting > luan
comparison lucene/src/luan/modules/lucene/LuceneSearcher.java @ 297:899253043270
remove PackageLuan.load_lib()
git-svn-id: https://luan-java.googlecode.com/svn/trunk@298 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Tue, 16 Dec 2014 03:26:43 +0000 |
parents | a35d1177bbf0 |
children | d34be4588556 |
comparison
equal
deleted
inserted
replaced
296:7ea6dfdf81ba | 297:899253043270 |
---|---|
26 import luan.LuanTable; | 26 import luan.LuanTable; |
27 import luan.LuanFunction; | 27 import luan.LuanFunction; |
28 import luan.LuanJavaFunction; | 28 import luan.LuanJavaFunction; |
29 import luan.LuanException; | 29 import luan.LuanException; |
30 import luan.LuanRuntimeException; | 30 import luan.LuanRuntimeException; |
31 import luan.LuanMethod; | |
31 | 32 |
32 | 33 |
33 public final class LuceneSearcher { | 34 public final class LuceneSearcher { |
34 private final LuceneIndex index; | 35 private final LuceneIndex index; |
35 private final IndexSearcher searcher; | 36 private final IndexSearcher searcher; |
74 @Override public boolean acceptsDocsOutOfOrder() { | 75 @Override public boolean acceptsDocsOutOfOrder() { |
75 return true; | 76 return true; |
76 } | 77 } |
77 } | 78 } |
78 | 79 |
79 public Object[] search( final LuanState luan, Query query, Object nObj, Sort sort ) throws LuanException, IOException { | 80 @LuanMethod public Object[] search( final LuanState luan, Query query, Object nObj, Sort sort ) throws LuanException, IOException { |
80 if( nObj instanceof LuanFunction ) { | 81 if( nObj instanceof LuanFunction ) { |
81 final LuanFunction fn = (LuanFunction)nObj; | 82 final LuanFunction fn = (LuanFunction)nObj; |
82 Collector col = new MyCollector() { | 83 Collector col = new MyCollector() { |
83 @Override public void collect(int doc) { | 84 @Override public void collect(int doc) { |
84 try { | 85 try { |