blob: 9f76dfb8cb24eaa7894111a8be524f1bb5b61ef3 [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Source code | Apache Lucene.NET 4.8.0 </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Source code | Apache Lucene.NET 4.8.0 ">
<meta name="generator" content="docfx 2.58.0.0">
<link rel="shortcut icon" href="../logo/favicon.ico">
<link rel="stylesheet" href="../styles/docfx.vendor.css">
<link rel="stylesheet" href="../styles/docfx.css">
<link rel="stylesheet" href="../styles/main.css">
<meta property="docfx:navrel" content="../toc.html">
<meta property="docfx:tocrel" content="toc.html">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:400,700%7CMerriweather%7CRoboto+Mono">
<link rel="stylesheet" href="/styles/site.css">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<span id="forkongithub"><a href="https://github.com/apache/lucenenet" target="_blank">Fork me on GitHub</a></span>
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo/lucene-net-color.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="">
<h1 id="source-code">Source code</h1>
<hr>
<h2 id="git-repository">Git repository</h2>
<p>Apache Lucene.Net uses git as its source code management system. More specifically, it use Apache's <a href="https://git.apache.org/">two-master</a> setup with a master repo on <a href="https://github.com/apache/lucenenet">GitHub</a> and on <a href="https://gitbox.apache.org/repos/asf?p=lucenenet.git">GitBox</a>. Either repo may be used for commits and pull requests as they automatically sync with one and other.</p>
<p>In practice, the team primarily uses the GitHub repo at <strong><a href="https://github.com/apache/lucenenet">https://github.com/apache/lucenenet</a></strong> for it's work. You can find current issues that need worked on in the <a href="https://github.com/apache/lucenenet/issues">issues list</a> there.</p>
<h2 id="setting-up-your-fork">Setting Up Your Fork</h2>
<p>If you would like to contribute to the project, typically the first thing you will want to do is to <a href="https://docs.github.com/en/get-started/signing-up-for-github/signing-up-for-a-new-github-account">create a github account</a> and then <a href="https://docs.github.com/en/get-started/quickstart/fork-a-repo">fork</a> the apache/LuceneNET GitHub repo. Forking the repo will place a copy of the repo (the &quot;Fork&quot;) in your GitHub account. A fork is a copy of a repository that you manage.</p>
<p>You use this fork to make changes without affecting the upstream repository. For more information, see GitHub Docs &quot;<a href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks">Working with forks</a>.&quot;</p>
<h2 id="cloning-that-fork">Cloning that Fork</h2>
<p>Next, you will typically clone that forked repo from your GitHub account so that you have a clone of it on your local machine to work with. If you are unfamiliar with cloning a GitHub repo see GitHub Docs <a href="https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository">&quot;Cloning a repository&quot;</a>. The git command for cloning the repo is:</p>
<pre><code>$ git clone https://github.com/YOUR-GITHUB-USERNAME/lucenenet.git
</code></pre>
<p>At this point you have a local copy of the Lucene.NET repo on your development machine.<br>
Most work currently happens on the branch named <strong>master</strong>. But typically you will create a new branch on your local repo for the changes you'd like to make and you will ultimately do a pull request to get that branch merged back into master. More about that later.</p>
<h2 id="building--testing">Building &amp; testing</h2>
<p>It's totally possible to build the project and run the unit tests all from the command line. You can find documentation for doing that in the Git repository <strong><a href="https://github.com/apache/lucenenet/blob/master/README.md#building-and-testing">here</a></strong>.</p>
<p>However, it's common for developers to build and test the project using Visual Studio by opening the <code>Lucene.Net.sln</code> solution file located in the root of the local repo. Some developers are currently using Visual Studio 2019 and some are using Visual Studio 2022. You may use whichever you prefer.</p>
<p>Once the solution has been opened in Visual Studio you can build it as you would any solution by selecting &quot;Build Solution&quot; from the &quot;Build&quot; menu. Likewise you can run the unit tests for the solution just like you would for any other solution by selecting &quot;Run All Tests&quot; from the &quot;Tests&quot; menu.</p>
<p>This is a large solution with more than <a href="https://lucenenet.apache.org/images/contributing/source/lucenenet-repo-lines-of-code--jan-2022.png">644K+ lines</a> of code so it may take a bit longer for Visual Studio to perform these operations then you are use to but it should display progress information while it does it work.</p>
<h2 id="making-changes">Making Changes</h2>
<p>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.</p>
<h2 id="contributing-your-changes-back">Contributing Your Changes Back</h2>
<p>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.</p>
<p>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.</p>
<p>In addition to what has been written here, there are lots of blog post on the web about how to get started with Open Source like <a href="https://www.freecodecamp.org/news/how-to-contribute-to-open-source-projects-beginners-guide/">this one</a> which provides a great orientation and top level overview.</p>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/apache/lucenenet/blob/master/websites/site/contributing/source.md/#L1" class="contribution-link">Improve this Doc</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<h5>In This Article</h5>
<div></div>
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
Copyright &copy; 2022 The Apache Software Foundation, Licensed under the <a href='http://www.apache.org/licenses/LICENSE-2.0' target='_blank'>Apache License, Version 2.0</a><br> <small>Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation. <br>All other marks mentioned may be trademarks or registered trademarks of their respective owners.</small>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../styles/docfx.js"></script>
<script type="text/javascript" src="../styles/main.js"></script>
</body>
</html>