[ 
https://issues.apache.org/jira/browse/LUCENENET-465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13192037#comment-13192037
 ] 

João Rosa commented on LUCENENET-465:
-------------------------------------

Yes I have.
The dll's are in folder packages (from nuget). Lucene is in subfolder 
Lucene.Net.2.9.4.1\lib\net40, and SharpZipLib is in subfolder 
SharpZipLib.0.86.0\lib\20.

Error: Syste.IO.FileNotFoundException, {"Can not load 
ICSharpCode.SharpZipLib.dll":null};
InnerException is null;
Message "Can not load ICSharpCode.SharpZipLib.dll";
StackTrace:    at SupportClass.SharpZipLib.CreateDeflater()
   at Lucene.Net.Documents.CompressionTools.Compress(Byte[] value_Renamed, 
Int32 offset, Int32 length, Int32 compressionLevel)
   at Lucene.Net.Documents.CompressionTools.Compress(Byte[] value_Renamed, 
Int32 offset, Int32 length)
   at Lucene.Net.Index.FieldsWriter.WriteField(FieldInfo fi, Fieldable field)
   at Lucene.Net.Index.StoredFieldsWriterPerThread.AddField(Fieldable field, 
FieldInfo fieldInfo)
   at Lucene.Net.Index.DocFieldProcessorPerThread.ProcessDocument()
   at Lucene.Net.Index.DocumentsWriter.UpdateDocument(Document doc, Analyzer 
analyzer, Term delTerm)
   at Lucene.Net.Index.DocumentsWriter.AddDocument(Document doc, Analyzer 
analyzer)
   at Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer)
   at Lucene.Net.Index.IndexWriter.AddDocument(Document doc)
   at Ideiota.Business.DAL.Services.SearchEngine.Indexer.IndexIdea(Idea idea, 
String path, Boolean indexInTemp) in 
D:\Projectos\Ideiota\Code\Ideiota\Ideiota.Business.DAL.Services\SearchEngine\Indexer.cs:line
 75


Thanks in advance
                
> Error indexing a document end Filed.Store.COMPRESS
> --------------------------------------------------
>
>                 Key: LUCENENET-465
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-465
>             Project: Lucene.Net
>          Issue Type: Bug
>          Components: .NET API
>    Affects Versions: Lucene.Net 2.9.4
>         Environment: Windows 7 x64 Professional, Visual Studio 2010 Ultimate 
> SP1, .NET 4.0, Lucene.net 2.9.4.1, SharpZipLib 0.86.0.518
>            Reporter: João Rosa
>            Priority: Blocker
>              Labels: lucene
>             Fix For: Lucene.Net 2.9.4
>
>
> I'm developing a index, and need to store values compressed, because its 
> needed to show that info to the user.
> I've the current error: "Can not load ICSharpCode.SharpZipLib.dll", when I do 
> the "writer.AddDocument(doc);"
> The DLLs are from NuGet.
> Snippet:
>  //retirar o directório
>                 System.IO.DirectoryInfo directoryInfo = new 
> System.IO.DirectoryInfo(path);
>                 //criar o directório para o lucene
>                 Directory directory = FSDirectory.Open(directoryInfo);
>                 //instanciar o analyser
>                 Analyzer analyzer = new SnowballAnalyzer("Portuguese");
>                 //abrir o indíce
>                 bool isNew = !IndexReader.IndexExists(directory);
>                 IndexWriter writer = new IndexWriter(directory, analyzer, 
> isNew, Lucene.Net.Index.IndexWriter.MaxFieldLength.UNLIMITED);
>                 //gravar o documento
>                 Document doc = new Document();
>                 NumericField numericField = new NumericField("id", 
> Field.Store.YES, false);
>                 numericField.SetIntValue(id);
>                 doc.Add(numericField);
>                 Field field = new Field("title", title, Field.Store.COMPRESS, 
> Field.Index.ANALYZED);
>                 field.SetBoost(7);
>                 doc.Add(field);
>                 field = new Field("description", tescription, 
> Field.Store.COMPRESS, Field.Index.ANALYZED);
>                 doc.Add(field);
>                 writer.AddDocument(doc);
>                 writer.Optimize();
>                 //Close the writer
>                 writer.Commit();
>                 writer.Close();
>             }
>             catch (Exception ex)
>             {
>                 throw ex;
>             }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to