You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: websites/site/contributing/how-to-setup-java-lucene-debugging.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,8 @@ Sometimes when porting Lucene 4.8 to Lucene.NET 4.8 it is helpful, or even neces
13
13
The Java Lucene 4.8 repository indicates that the following development environments are supported:
14
14
15
15
+ Eclipse - Basic support (help/IDEs.txt).
16
-
+ IntelliJ - IntelliJ idea can import the project out of the box.
17
-
+Netbeans - Not tested.
16
+
+ IntelliJ - IntelliJ IDEA can import the project out of the box.
17
+
+NetBeans - Not tested.
18
18
19
19
In this document however, we will be using Eclipse because it's open source and widely used. Because Java Lucene 4.8 uses an old version of the Java JDK that has known security issues, the approach we take here is to setup a virtual machine vis VirtualBox to quarantine our use of the insecure JDK.
20
20
@@ -65,7 +65,7 @@ To change the location where the machine will be stored, click the Preferences i
In this walkthrough we will be running Windows 10 in the VM. Note that to do this one needs a 2nd Windows 10 license other then the one installed on the physical machine. So two licenses are needed, one for the physical machine OS install and one for the VM OS install. If you don't have a spare Windows 10 license to use in the VM you can consider installing ubuntu or other open source OS. Next to run Windows 10 in the VM we much download and create Windows 10 installation media. This can be done from https://www.microsoft.com/en-us/software-download/windows10 . Start by downloading the installation media tool.
68
+
In this walkthrough we will be running Windows 10 in the VM. Note that to do this one needs a 2nd Windows 10 license other than the one installed on the physical machine. So two licenses are needed, one for the physical machine OS install and one for the VM OS install. If you don't have a spare Windows 10 license to use in the VM you can consider installing ubuntu or other open source OS. Next to run Windows 10 in the VM we much download and create Windows 10 installation media. This can be done from https://www.microsoft.com/en-us/software-download/windows10 . Start by downloading the installation media tool.
And then it will begin downloading the file and displaying a progress indicator. Once the file is downloaded, we have now have the ISO file we need for installing the OS inside of VirtualBox.
86
+
And then it will begin downloading the file and displaying a progress indicator. Once the file is downloaded, we now have the ISO file we need for installing the OS inside of VirtualBox.
87
87
88
88
Once that's done, you can click Finished in the dialog that comes up since we don't need to burn this ISO file to a dvd. Having it on the hard drive is fine.
89
89
@@ -266,7 +266,7 @@ Use version 3.8.1. https://maven.apache.org/download.cgi The installation proce
In the dialog avove I ched the default Git editor from vim to Notepad. Pick whatever you like. In general for the other dialogs I kept the defaults including on this one
297
+
In the dialog above I changed the default Git editor from vim to Notepad. Pick whatever you like. In general for the other dialogs I kept the defaults including on this one
### Why not clone the code directly from Java Lucene Repo?
315
-
It turns out that it's no longer possible to directly compile the Lucene 4.8 code obtained from the Java Lucene Repo without modification. Unlike NuGet which makes old versions available forever and is always online, Maven has lots of mirrors that may cease to exist at some point, and that is what's happed, so the configuration in the Java Lucene 4.8 Repo is out of date and no longer builds.
315
+
It turns out that it's no longer possible to directly compile the Lucene 4.8 code obtained from the Java Lucene Repo without modification. Unlike NuGet which makes old versions available forever and is always online, Maven has lots of mirrors that may cease to exist at some point, and that is what's happened, so the configuration in the Java Lucene 4.8 Repo is out of date and no longer builds.
316
316
317
317
In addition, Java 8 (which we need for Eclipse) detects an error in the code that Java 7 did not, so the build doesn't complete. It is due to some fields that are marked final that are disposed at the end of the constructor (so they really don't need to be fields). Taking the final keyword off of the field removes the error. So, the project has to be modified slightly so all of this can happen.
318
318
@@ -398,7 +398,7 @@ In my case it took about 10 minutes for ant to download all the dependencies. T
398
398
## Using Eclipse
399
399
400
400
### Getting Stared with Eclipse
401
-
Now we need to open eclipse and create a workspace. So we use windows to go to the eclipse folder which in my case is here C:\Program Files\eclipse and we double click on eclipse to run it.
401
+
Now we need to open eclipse and create a workspace. So we use Windows to go to the eclipse folder which in my case is here C:\Program Files\eclipse and we double click on eclipse to run it.
Eclipse has a different "perspective" for debugging than for browsing projects, similar to in VisualStudo. However, it gives you a choice whether you want to use it or not. Click yes, but don't choose to remember the setting, because it's not clear where to find it again.
491
+
Eclipse has a different "perspective" for debugging than for browsing projects, similar to in Visual Studio. However, it gives you a choice whether you want to use it or not. Click yes, but don't choose to remember the setting, because it's not clear where to find it again.
492
492
493
493
And it will launch into the debugger layout and be waiting on the breakpoint.
494
494
@@ -501,7 +501,7 @@ Step Into is F5<br>
501
501
Step Over is F6<br>
502
502
Step Return is F7<br>
503
503
504
-
So it works much like VisualStudio but the F key configuration is different. You can of course just click the icons at the top of the window, or goggle and there is probably a way to change the F key configuration for the debugger actions.
504
+
So it works much like Visual Studio but the F key configuration is different. You can of course just click the icons at the top of the window, or goggle and there is probably a way to change the F key configuration for the debugger actions.
505
505
506
506
<fontstyle="font-weight:bold; font-size: 17px">There ya go. You are now in Eclipse, and able to run the debugger for Lucene 4.8 Java code.</font>
507
507
@@ -520,7 +520,7 @@ Basically, it is cloning the whole repo again in the subdirectory lucene-4.8.1.
Copy file name to clipboardExpand all lines: websites/site/contributing/source.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Apache Lucene.Net uses git as its source code management system. More specifica
9
9
In practice, the team primarily uses the GitHub repo at **[https://github.com/apache/lucenenet](https://github.com/apache/lucenenet)** for it's work. You can find current issues that need worked on in the [issues list](https://github.com/apache/lucenenet/issues) there.
10
10
11
11
## Setting Up Your Fork
12
-
If you would like to contribute to the project, typically the first thing you will want to do is to [create a github account](https://docs.github.com/en/get-started/signing-up-for-github/signing-up-for-a-new-github-account) and then [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the apache/LuceneNET GitHub repo. Forking the repo will place a copy of the repo (the "Fork") in your GitHub account. A fork is a copy of a repository that you manage.
12
+
If you would like to contribute to the project, typically the first thing you will want to do is to [create a GitHub account](https://docs.github.com/en/get-started/signing-up-for-github/signing-up-for-a-new-github-account) and then [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the apache/LuceneNET GitHub repo. Forking the repo will place a copy of the repo (the "Fork") in your GitHub account. A fork is a copy of a repository that you manage.
13
13
14
14
You use this fork to make changes without affecting the upstream repository. For more information, see GitHub Docs "[Working with forks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks)."
15
15
@@ -38,10 +38,10 @@ This is a large solution with more than [644K+ lines](https://lucenenet.apache.o
38
38
39
39
## Making Changes
40
40
41
-
If you would like to make a change to the source code or other files, typically you will first make a new branch in your local repository. Then make the changes in that branch and commit them to your local repository. If there are several different types of changes you'd like to make it's best to put each type of change into a seperate commit so that each commit description can be more specific.
41
+
If you would like to make a change to the source code or other files, typically you will first make a new branch in your local repository. Then make the changes in that branch and commit them to your local repository. If there are several different types of changes you'd like to make it's best to put each type of change into a separate commit so that each commit description can be more specific.
42
42
43
43
## Contributing Your Changes Back
44
-
Once you have made your change to a newly created branch of your local repo, push those changes to the remote repository located in your GitHub account. Then visit that your GitHub repo via the browser and it should display a button you can click to compare it to the upstream repo (ie. the apache/lucenenet rep you forked from) and to submit a pull request. That pull request (PR) is your way of letting the Lucene.NET core team know you have a contribution that you would like to have merged into the official Lucene.NET repo.
44
+
Once you have made your change to a newly created branch of your local repo, push those changes to the remote repository located in your GitHub account. Then visit that your GitHub repo via the browser and it should display a button you can click to compare it to the upstream repo (i.e. the apache/lucenenet rep you forked from) and to submit a pull request. That pull request (PR) is your way of letting the Lucene.NET core team know you have a contribution that you would like to have merged into the official Lucene.NET repo.
45
45
46
46
Someone will get back to you with feedback if needed, or will directly merge your changes into the official repo. Any action they take on the PR will trigger an email to the email address of your GitHub account so that you have visibility as to what's going on with your submission.
Copy file name to clipboardExpand all lines: websites/site/quick-start/introduction.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,11 @@ uid: quick-start/introduction
10
10
11
11
Apache Lucene.NET is a C# port of Java based Apache Lucene. Apache Lucene has a huge following and is used directly or indirectly to power search by many companies you probably know including Amazon, Twitter, LinkedIn, Netflix, Salesforce, SAS, and Microsoft Power BI.
12
12
13
-
Apache Lucene is the core search library used by popular open source search servers like Apache Solr, ElasticSearch and OpenSearch. The reason Apache Lucene is so widely used is because it's extremely powerful and can index large amounts of data quickly -- think 100s of GB/Hours. And it can perform full text search on that data in sub-second time. And unlike traditional sql databases, it's data engine is optimized for full text search.
13
+
Apache Lucene is the core search library used by popular open source search servers like Apache Solr, ElasticSearch and OpenSearch. The reason Apache Lucene is so widely used is because it's extremely powerful and can index large amounts of data quickly -- think 100s of GB/Hours. And it can perform full text search on that data in sub-second time. And unlike traditional SQL databases, it's data engine is optimized for full text search.
14
14
15
-
The codebase for Apache Lucene is very mature. In March 2020, the open source project celebrated it's 20th birthday. You can scroll through the years and see the major [Apache Lucene milestones](https://www.elastic.co/celebrating-lucene).
15
+
The codebase for Apache Lucene is very mature. In March 2020, the open source project celebrated its 20th birthday. You can scroll through the years and see the major [Apache Lucene milestones](https://www.elastic.co/celebrating-lucene).
16
16
17
-
Apache Lucene.NET 4.8 is an open source project who's aim is to be a line by line c# port of java based Apache Lucene 4.8. This port makes the power of Lucene available to all .NET developers. And makes it easy for them to contribute to the project or customize it since it's pure C#.
17
+
Apache Lucene.NET 4.8 is an open source project whose aim is to be a line by line c# port of java based Apache Lucene 4.8. This port makes the power of Lucene available to all .NET developers. And makes it easy for them to contribute to the project or customize it since it's pure C#.
18
18
19
19
Currently Lucene.NET 4.8 is in Beta but it is extremely stable and many developers already use it in production. It has far more features than Lucene.NET 3.03 and has much better unit test coverage than the older version. Lucene.NET has more than 7800+ passing unit tests. This test coverage is what makes Lucene.NET so stable.
20
20
@@ -35,7 +35,7 @@ At this early stage of your journey it's probably good to cover a few things abo
35
35
36
36
Lucene and hence Lucene.NET stores data in immutable "segments." Segments are made of multiple files. Segments automatically get merged together to form new bigger segments and then the old segments are typically deleted by the merge process. This approach is based on what is called a Log Structured Merge (LSM) design.
37
37
38
-
LSM has become the defacto standard for NoSql databases and is used not only by Lucene but also by Google BigTable, Apache Hbase, Apache Cassandra and many others. The details of each implementation vary as does the number and types of files used. So let's take a look at what those files might look like for a Lucene.NET index.
38
+
LSM has become the defacto standard for NoSql databases and is used not only by Lucene but also by Google BigTable, Apache HBase, Apache Cassandra and many others. The details of each implementation vary as does the number and types of files used. So let's take a look at what those files might look like for a Lucene.NET index.
39
39
40
40
41
41
Here is an example of Lucene.NET's files for a brand new index with one segment:
@@ -60,7 +60,7 @@ Here is a two segment example that has gone through merges many times:
60
60
61
61
62
62
### Lucene Directories
63
-
We already mentioned that the data is stored in segments. Those segments can be stored via different classes that inherit from `Lucene.Net.Store.Directory`. Some of those classes, like `FSDirectory` store to your local file system, other can store elsewhere. For example a `RAMDirectory` can be useful for unit tests as it stores the segments in RAM. So one of the things that we must provide an `IndexWriter` is a instance of a `Lucene.Net.Store.Directory` that is the type of directory we want to work with.
63
+
We already mentioned that the data is stored in segments. Those segments can be stored via different classes that inherit from `Lucene.Net.Store.Directory`. Some of those classes, like `FSDirectory` store to your local file system, other can store elsewhere. For example a `RAMDirectory` can be useful for unit tests as it stores the segments in RAM. So one of the things that we must provide an `IndexWriter` is an instance of a `Lucene.Net.Store.Directory` that is the type of directory we want to work with.
64
64
65
65
66
66
### How the Pieces Fit Together
@@ -77,4 +77,4 @@ Here is a two segment example that has gone through merges many times:
77
77
78
78
79
79
### Wrapping Up
80
-
I hope this introduction has helped you to understand a bit about Lucene.NET. The information we have covered so far should give you a bit of a foundation to work from as you work through the [tutorial examples](xref:quick-start/tutorial) and then dig deaper into the [Lucene.NET Documentation](xref:docs) and [Learning Resources](xref:quick-start/learning-resources).
80
+
I hope this introduction has helped you to understand a bit about Lucene.NET. The information we have covered so far should give you a bit of a foundation to work from as you work through the [tutorial examples](xref:quick-start/tutorial) and then dig deeper into the [Lucene.NET Documentation](xref:docs) and [Learning Resources](xref:quick-start/learning-resources).
0 commit comments