Lucene on Android

I am new to Android and Lucene . can i use Lucene to search in android list view . I tried to import package 2.3.2 and also used jar files in the library. However, SearchFiles.java is an error in SearchFiles.java , an error:
The type java.rmi.Remote cannot be resolved. It is indirectly referenced from .class files.

There is a chance that this file does not exist for android. This is problem?

+7
source share
5 answers

You can use the built-in Full Text Search function, called FTS3 in SQLite , which is available on Android, and it is faster (since it was launched initially) and uses less memory than the Java Lucene implementation with Dalvik VM.

+9
source
  • Remove "extends java.rmi.Remote" from the class "Org.apache.lucene.search.Searchable"
  • Delete class "org.apache.lucene.search.RemoteSearchable"
+5
source

I have successfully used Lucene 3.3 for a really simple search and it works. However, I have no idea how memory usage affects. In 3.3 there is no dependency on RMI. If you need 2.3.2 and you have the source code, you can free Lucene from dependence on RMI (I read about the guy who did it).

+4
source

Android is not java - it does not provide all the standard java apis (just look at the android link, java.rmi does not exist). However, you can import almost everything that is pure java (if you have enough memory). You can try to remove unnecessary classes that cause problems with loading classes from jars-bu, this is a lot of work.

+3
source

I think this demo application will work for you.

https://github.com/weiweiwang/quickdialer

He has:

  • quick search t9
  • support for 5000 contacts
  • 500 magazines
+3
source

All Articles