You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Greenhorn Techie <gr...@gmail.com> on 2018/05/21 10:35:52 UTC

Navigating through Solr Source Code

Hi,

As the documentation around Solr is limited, I am thinking to go through
the source code and understand the various bits and pieces. However, I am a
bit confused on where to start as I my developing skills are a bit limited.

Any thoughts on how best to start / where to start looking into Solr source
code?

Thanks

Re: Navigating through Solr Source Code

Posted by Greenhorn Techie <gr...@gmail.com>.
Thanks for your responses.

Best Regards!


On 21 May 2018 at 16:40:10, Shawn Heisey (apache@elyograg.org) wrote:

On 5/21/2018 4:35 AM, Greenhorn Techie wrote:
> As the documentation around Solr is limited, I am thinking to go through
> the source code and understand the various bits and pieces. However, I am
a
> bit confused on where to start as I my developing skills are a bit
limited.
>
> Any thoughts on how best to start / where to start looking into Solr
source
> code?

As Erick has said, the rabbit hole is very deep.I've been looking into
it for a few years now.  There are parts of it that are a complete mystery.

Depending on exactly what you're looking for, one approach is to examine
the SolrDispatchFilter class.  This is the entry point from the servlet
container for most HTTP requests, and a lot of Solr's startup
initialization is found there.

The solr/webapp/web/WEB-INF/web.xml file in the source code checkout is
what loads SolrDispatchFilter and a few other classes when Solr starts.

Thanks,
Shawn

Re: Navigating through Solr Source Code

Posted by Shawn Heisey <ap...@elyograg.org>.
On 5/21/2018 4:35 AM, Greenhorn Techie wrote:
> As the documentation around Solr is limited, I am thinking to go through
> the source code and understand the various bits and pieces. However, I am a
> bit confused on where to start as I my developing skills are a bit limited.
>
> Any thoughts on how best to start / where to start looking into Solr source
> code?

As Erick has said, the rabbit hole is very deep.I've been looking into 
it for a few years now.  There are parts of it that are a complete mystery.

Depending on exactly what you're looking for, one approach is to examine 
the SolrDispatchFilter class.  This is the entry point from the servlet 
container for most HTTP requests, and a lot of Solr's startup 
initialization is found there.

The solr/webapp/web/WEB-INF/web.xml file in the source code checkout is 
what loads SolrDispatchFilter and a few other classes when Solr starts.

Thanks,
Shawn


Re: Navigating through Solr Source Code

Posted by Deepak Goel <de...@gmail.com>.
If you can find out how Solr evolved over the years, you can perhaps follow
that same path

On Mon, 21 May 2018, 18:35 Erick Erickson, <er...@gmail.com> wrote:

> Another useful trick is the class hierarchy displays most modern IDE's
> have available to get a sense of what class is where. And I second
> Emir's comment about picking some feature. _Nobody_ knows all the Solr
> code, and that's not even including Lucene. It's big, very big. So
> pick a feature you want to understand and/or improve and stick to that
> or you'll go nuts.
>
> And a great way to get a sense of how a feature works is to find the
> unit test that exercises it and just step through it in the debugger.
> And if there's no unit test, another great way to do things would be
> to _create_ a unit test. Or fix some of the BadApple tests, but those
> will be pretty hairy....
>
> Best,
> Erick
>
> On Mon, May 21, 2018 at 7:18 AM, Emir Arnautović
> <em...@sematext.com> wrote:
> > Hi,
> > I would start from the feature/concept that I find documentation to be
> vague. If you think that everything is like that, I would not start with
> code just yet and would focus on understanding high level concepts first.
> Also, you need to figure out if some feature is Solr or Lucene and if it is
> Solr if cloud mode is involved or not. I would suggest that you start
> simple tog get familiar with Solr concepts. Set up local dev env, put some
> break point and start following it.
> >
> > Good luck,
> > Emir
> > --
> > Monitoring - Log Management - Alerting - Anomaly Detection
> > Solr & Elasticsearch Consulting Support Training - http://sematext.com/
> >
> >
> >
> >> On 21 May 2018, at 12:35, Greenhorn Techie <gr...@gmail.com>
> wrote:
> >>
> >> Hi,
> >>
> >> As the documentation around Solr is limited, I am thinking to go through
> >> the source code and understand the various bits and pieces. However, I
> am a
> >> bit confused on where to start as I my developing skills are a bit
> limited.
> >>
> >> Any thoughts on how best to start / where to start looking into Solr
> source
> >> code?
> >>
> >> Thanks
> >
>

Re: Navigating through Solr Source Code

Posted by Erick Erickson <er...@gmail.com>.
Another useful trick is the class hierarchy displays most modern IDE's
have available to get a sense of what class is where. And I second
Emir's comment about picking some feature. _Nobody_ knows all the Solr
code, and that's not even including Lucene. It's big, very big. So
pick a feature you want to understand and/or improve and stick to that
or you'll go nuts.

And a great way to get a sense of how a feature works is to find the
unit test that exercises it and just step through it in the debugger.
And if there's no unit test, another great way to do things would be
to _create_ a unit test. Or fix some of the BadApple tests, but those
will be pretty hairy....

Best,
Erick

On Mon, May 21, 2018 at 7:18 AM, Emir Arnautović
<em...@sematext.com> wrote:
> Hi,
> I would start from the feature/concept that I find documentation to be vague. If you think that everything is like that, I would not start with code just yet and would focus on understanding high level concepts first. Also, you need to figure out if some feature is Solr or Lucene and if it is Solr if cloud mode is involved or not. I would suggest that you start simple tog get familiar with Solr concepts. Set up local dev env, put some break point and start following it.
>
> Good luck,
> Emir
> --
> Monitoring - Log Management - Alerting - Anomaly Detection
> Solr & Elasticsearch Consulting Support Training - http://sematext.com/
>
>
>
>> On 21 May 2018, at 12:35, Greenhorn Techie <gr...@gmail.com> wrote:
>>
>> Hi,
>>
>> As the documentation around Solr is limited, I am thinking to go through
>> the source code and understand the various bits and pieces. However, I am a
>> bit confused on where to start as I my developing skills are a bit limited.
>>
>> Any thoughts on how best to start / where to start looking into Solr source
>> code?
>>
>> Thanks
>

Re: Navigating through Solr Source Code

Posted by Emir Arnautović <em...@sematext.com>.
Hi,
I would start from the feature/concept that I find documentation to be vague. If you think that everything is like that, I would not start with code just yet and would focus on understanding high level concepts first. Also, you need to figure out if some feature is Solr or Lucene and if it is Solr if cloud mode is involved or not. I would suggest that you start simple tog get familiar with Solr concepts. Set up local dev env, put some break point and start following it.

Good luck,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 21 May 2018, at 12:35, Greenhorn Techie <gr...@gmail.com> wrote:
> 
> Hi,
> 
> As the documentation around Solr is limited, I am thinking to go through
> the source code and understand the various bits and pieces. However, I am a
> bit confused on where to start as I my developing skills are a bit limited.
> 
> Any thoughts on how best to start / where to start looking into Solr source
> code?
> 
> Thanks