Category: Open Source

How to search a Lucene.Net index in C#

Benjamin Perkins Lucene.NET

I used this code to perform a search of a Lucene.Net index. Lucene.Net.Store..Directory directory =      Lucene.Net.Store.FSDirectory                .Open(new DirectoryInfo(textBoxSearchIndex.Text)); Lucene.Net.Analysis.Analyzer analyzer =      new Lucene.Net.Analysis.Standard                    .StandardAnalyzer(LuceneUtil.Version.LUCENE_29); Lucene.Net.Search.Searcher searcher =      new Lucene.Net.Search                .IndexSearcher(LuceneIndex.IndexReader                                          .Open(directory, true)); Lucene.Net.Search.Query query =      new Lucene.Net.QueryParsers                .QueryParser(LuceneUtil.Version.LUCENE_29,                             “contents”, analyzer)                             .Parse(textBoxSearch.Text); Lucene.Net.Search.Hits hits = […]

Read More →

Lucene.NET returns results only when using numeric values

Benjamin Perkins Lucene.NET

I used this code to create a Lucene.Net 2.9.2 index. System.IO.DirectoryInfo indexFileLocation = new System.IO.DirectoryInfo(textBox1.Text); Lucene.Net.Store.Directory directory = Lucene.Net.Store.FSDirectory.Open(indexFileLocation); Lucene.Net.Analysis.Analyzer analyzer = new Lucene.Net .Analysis .Standard .StandardAnalyzer(LuceneUtil.Version.LUCENE_29); IndexWriter writer = new IndexWriter(directory, analyzer, true, IndexWriter.MaxFieldLength.UNLIMITED); foreach (IList item in dataToIndex) { Document doc = new Document(); doc.Add(new Field(“ID”, item[0].ToString(), Field.Store.YES, Field.Index.NO)); …. string contents = […]

Read More →

How to delete a Docker image

Benjamin Perkins Docker

I was able to remove some of my unwanted images by accessing my Docker Cloud account here.  As seen in Figure 1, navigate to your repositories, click on those dots, a delete popup is rendered. Figure 1, how to delete a docker image repository I write this because when I searched all I found was […]

Read More →

Kali Linux for Windows

Benjamin Perkins Windows

This is pretty cool as I am very interested in this specific flavor of Linux.  I have installed it and it’s very cool.  You can down load this from the Microsoft Store. Then search for “Kali” and install it. Here is the description: “The Kali for Windows application allows one to install and run the […]

Read More →