question about SolrCore

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

question about SolrCore

Li Li
hi all,
    I want to know the detail of IndexReader in SolrCore. I read a
little codes of SolrCore. Here is my understanding, are they correct?
    Each SolrCore has many SolrIndexSearcher and keeps them in
_searchers. and _searcher keep trace of the latest version of index.
Each SolrIndexSearcher has a SolrIndexReader. If there isn't any
update, all these searchers share one single SolrIndexReader. If there
is an update, then a newSearcher will be created and a new
SolrIndexReader associated with it.
    I did a simple test.
    A thread do a query and blocked by breakpoint. Then I feed some
data to update index. When commit, a newSearcher is created.
    Here is the debug info:

    SolrCore _searcher [SolrIndexSearcher@...ab]

_searchers[SolrIndexSearcher@...77,SolrIndexSearcher@...ab,SolrIndexSearcher@..f8]
                 SolrIndexSearcher@...77 's SolrIndexReader is old one
and     ab and f8 share the same newest SolrIndexReader
    When query finished SolrIndexSearcher@...77 is discarded. When
newSearcher success to warmup, There is only one SolrIndexSearcher.
    The SolrIndexReader of old version of index is discarded and only
segments in newest SolrIndexReader are referenced. Those segments not
in new version can then be deleted because no file pointer reference
them
.
    Then I start 3 queries. There is only one SolrIndexSearcher but RefCount=4.
    It seems many search can share one single SolrIndexSearcher.
    So in which situation, there will exist more than one
SolrIndexSearcher that they share just one SolrIndexReader?
    Another question, for each version of index, is there just one
SolrIndexReader instance associated with it? will it occur that more
than one SolrIndexReader are opened and they are the same version of
index?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: question about SolrCore

Li Li
is there anyone could help me?

2010/10/11 Li Li <[hidden email]>:

> hi all,
>    I want to know the detail of IndexReader in SolrCore. I read a
> little codes of SolrCore. Here is my understanding, are they correct?
>    Each SolrCore has many SolrIndexSearcher and keeps them in
> _searchers. and _searcher keep trace of the latest version of index.
> Each SolrIndexSearcher has a SolrIndexReader. If there isn't any
> update, all these searchers share one single SolrIndexReader. If there
> is an update, then a newSearcher will be created and a new
> SolrIndexReader associated with it.
>    I did a simple test.
>    A thread do a query and blocked by breakpoint. Then I feed some
> data to update index. When commit, a newSearcher is created.
>    Here is the debug info:
>
>    SolrCore _searcher [SolrIndexSearcher@...ab]
>
> _searchers[SolrIndexSearcher@...77,SolrIndexSearcher@...ab,SolrIndexSearcher@..f8]
>                 SolrIndexSearcher@...77 's SolrIndexReader is old one
> and     ab and f8 share the same newest SolrIndexReader
>    When query finished SolrIndexSearcher@...77 is discarded. When
> newSearcher success to warmup, There is only one SolrIndexSearcher.
>    The SolrIndexReader of old version of index is discarded and only
> segments in newest SolrIndexReader are referenced. Those segments not
> in new version can then be deleted because no file pointer reference
> them
> .
>    Then I start 3 queries. There is only one SolrIndexSearcher but RefCount=4.
>    It seems many search can share one single SolrIndexSearcher.
>    So in which situation, there will exist more than one
> SolrIndexSearcher that they share just one SolrIndexReader?
>    Another question, for each version of index, is there just one
> SolrIndexReader instance associated with it? will it occur that more
> than one SolrIndexReader are opened and they are the same version of
> index?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]