Home >  Luca.Net >  Lucene Compatible

Lucene Compatible

SearchBlackBox Luca.Net offers a byte-to-byte Apache Lucene compatible API for .NET developers.

SearchBlackBox Luca.Net provides the following levels of compatibility:

  • Version compatibility
  • Features compatibility
  • Index format compatibility
  • Configuration settings compatibility
  • Source code compatibility
  • Version Compatibility

    The latest version of SearchBlackBox Luca.Net is compatible with Apache Lucene 1.4.3.

    Top of Page
    Features Compatibility

    SearchBlackBox Luca.Net off includes all full-text search features similar to original Apache Lucene full-text search features.

    Top of Page
    Index Format Compatibility

    SearchBlackBox Luca.Net is compatible with Apache Lucene on the index level - programs written with SearchBlackBox Luca.Net can use indexes created by programs written with Apache Lucene. The opposite is also true.

    Top of Page
    Configuration Settings Compatibility

    SearchBlackBox Luca.Net is compatible with Apache Lucene on the level of configuration files. For example, all you have to do to forbid the use of locks in Apache Lucene is to add the key "disableLuceneLocks" to the configuration file. All the actions for SearchBlackBox Luca.Net will be similar as well.

    Top of Page
    Source Code Compatibility

    SearchBlackBox Luca.Net is compatible with Apache Lucene regarding the source code. It means that the code written on java and using Apache Lucene can be transferred to C# with minimal changes.

    This compatibility also allows .NET developers to use references for java developers, for example articles, books and samples.

    To illustrate this, let us compare the standard use of Apache Lucene with the similar use of SearchBlackBox Luca.Net. The main parts where Lucene API is used are marked.

    Apache Lucene java code:

    class CodeCompatibilitiesTest {
     public static void main(String[] args) 
     {
       Analyzer analyzer = new SimpleAnalyzer();
       IndexReader reader = IndexReader.open(args[0], analyzer, false);
       for(int i=0; i<reader.maxDoc(); i++) 
       {
         if(reader.isDeleted(i) != true) 
         {
           Document doc = reader.doc(i);
           System.out.println(doc.get("title"));
         }
         reader.close();
       }
     }
    }
    			
    SearchBlackBox Luca.Net C# code:
    class CodeCompatibilitiesTest {
     public static void Main(String[] args) 
     {
       Analyzer analyzer = new SimpleAnalyzer();
       IndexReader reader = IndexReader.Open(args[0], analyzer, false);
       for(int i=0; i<reader.MaxDoc(); i++) 
       {
         if(reader.IsDeleted(i) != true) 
         {
           Document doc = reader.Doc(i);
           System.out.println(doc.Get("title"));
         }
         reader.Close();
       }
     }
    }
    

    As you can see, all the difference is that the java naming style - method names are started with the lower case - is used in the java version, while the .NET version makes use of the C# naming style - method names are started with the upper case. The code using Apache Lucene API is identical in all other ways.

    Top of Page
    Conclusion

    SearchBlackBox Luca.Net offers a maximum compatibility with Apache Lucene.

    Download

    Download free demo version now. Satisfied with the demo? Purchase Online Now.

    Questions? Need assistance before or after purchasing? Click here for customer support.